summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNeels Hofmeyr <nhofmeyr@sysmocom.de>2016-12-11 00:27:48 +0100
committerNeels Hofmeyr <nhofmeyr@sysmocom.de>2016-12-11 01:07:26 +0100
commit40d8b01deae185a3f043c242842e254ae67a42c2 (patch)
tree638e9877020cc113306d04220629175a1c607422 /src
parent7f8c3010058ae6d0cda8f651931068195af8a19b (diff)
build with autoconf/automake, add jenkins.sh script
Add configure.ac and Makefile.ams to build with autoreconf && ./configure && make like most other Osmocom projects. Add jenkins.sh for a gerrit build job to verify patches. Change-Id: I6b4419dd519f3d0a75235d0c22bf899f075347a3
Diffstat (limited to 'src')
-rw-r--r--src/Makefile18
-rw-r--r--src/Makefile.am61
2 files changed, 61 insertions, 18 deletions
diff --git a/src/Makefile b/src/Makefile
deleted file mode 100644
index d2536b5..0000000
--- a/src/Makefile
+++ /dev/null
@@ -1,18 +0,0 @@
-LDFLAGS += -losmocore -losmogsm -losmoabis -lsqlite3 -ltalloc
-CFLAGS += -g -Wall
-
-OBJS = auc.o db.o db_auc.o db_hlr.o logging.o
-
-all: db_test hlr
-
-db_test: db_test.o rand_fake.o $(OBJS)
- $(CC) -o $@ $^ $(LDFLAGS)
-
-hlr: hlr.o gsup_server.o gsup_router.o rand_urandom.o $(OBJS)
- $(CC) -o $@ $^ $(LDFLAGS)
-
-%.o: %.c
- $(CC) $(CFLAGS) -o $@ -c $^
-
-clean:
- rm -f *.o db_test
diff --git a/src/Makefile.am b/src/Makefile.am
new file mode 100644
index 0000000..3286560
--- /dev/null
+++ b/src/Makefile.am
@@ -0,0 +1,61 @@
+AM_CFLAGS = \
+ -Wall \
+ $(LIBOSMOCORE_CFLAGS) \
+ $(LIBOSMOGSM_CFLAGS) \
+ $(LIBOSMOVTY_CFLAGS) \
+ $(LIBOSMOABIS_CFLAGS) \
+ $(SQLITE3_CFLAGS) \
+ $(NULL)
+
+EXTRA_DIST = \
+ populate_hlr_db.pl \
+ $(NULL)
+
+noinst_HEADERS = \
+ auc.h \
+ db.h \
+ gsup_router.h \
+ gsup_server.h \
+ logging.h \
+ rand.h \
+ $(NULL)
+
+bin_PROGRAMS = \
+ osmo-hlr \
+ db_test \
+ $(NULL)
+
+osmo_hlr_SOURCES = \
+ auc.c \
+ db.c \
+ db_auc.c \
+ db_hlr.c \
+ gsup_router.c \
+ gsup_server.c \
+ hlr.c \
+ logging.c \
+ rand_urandom.c \
+ $(NULL)
+
+osmo_hlr_LDADD = \
+ $(LIBOSMOCORE_LIBS) \
+ $(LIBOSMOGSM_LIBS) \
+ $(LIBOSMOVTY_LIBS) \
+ $(LIBOSMOABIS_LIBS) \
+ $(SQLITE3_LIBS) \
+ $(NULL)
+
+db_test_SOURCES = \
+ auc.c \
+ db.c \
+ db_auc.c \
+ db_test.c \
+ logging.c \
+ rand_fake.c \
+ $(NULL)
+
+db_test_LDADD = \
+ $(LIBOSMOCORE_LIBS) \
+ $(LIBOSMOGSM_LIBS) \
+ $(SQLITE3_LIBS) \
+ $(NULL)