summaryrefslogtreecommitdiff
path: root/titan/Makefile
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2019-05-20 17:00:39 +0200
committerHarald Welte <laforge@gnumonks.org>2019-05-20 17:02:29 +0200
commit71f0f1d94d3de425dd177df88c21cca0fb7b0500 (patch)
treef2d0581aaa18b29217ef1dbec7075e198eaa8061 /titan/Makefile
parentdb8c4ca598cd6890a23e75a29a20e514a1d957c8 (diff)
titan support: Rebuild C++ source from ttcn using ttcn3_compiler
Diffstat (limited to 'titan/Makefile')
-rw-r--r--titan/Makefile13
1 files changed, 11 insertions, 2 deletions
diff --git a/titan/Makefile b/titan/Makefile
index e11dd1b..2aeebb9 100644
--- a/titan/Makefile
+++ b/titan/Makefile
@@ -1,3 +1,8 @@
+TYPE_MODULES:=General Osmocom MNCC PCUIF
+
+TYPE_CC=$(TYPE_MODULES:%=%_Types.cc)
+TYPE_HH=$(TYPE_MODULES:%=%_Types.hh)
+GENERATED=$(TYPE_CC) $(TYPE_HH)
OBJS=General_Types.o Osmocom_Types.o hello.o
OBJS+=MNCC_Types.o MNCC_EncDec.o
@@ -7,7 +12,10 @@ CXXFLAGS=-DLINUX -DMAKEDEPEND_RUN -I/usr/include/titan -fPIC
LDFLAGS=-L/usr/lib/titan -fPIC -lttcn3-dynamic
LDFLAGS_STATIC=-L/usr/lib/titan -lttcn3 -lxml2 -lssl -lcrypto
-all: titan.a
+all: compile titan.a
+
+$(GENERATED):
+ ttcn3_compiler -D *.ttcn
titan.a: $(OBJS)
$(AR) r $@ $^
@@ -15,5 +23,6 @@ titan.a: $(OBJS)
%.o: %.cc
$(CXX) $(CXXFLAGS) -c -o $@ $^
+.PHONY: clean
clean:
- @rm titan.a $(OBJS)
+ @rm -f titan.a $(OBJS) $(GENERATED)
personal git repositories of Harald Welte. Your mileage may vary