(no commit message)
[libt2n] / example-codegen / Makefile.am
... / ...
CommitLineData
1INCLUDES = -I$(top_srcdir)/src @BOOST_CPPFLAGS@ @CPPUNIT_CFLAGS@ -I$(top_srcdir)/codegen
2
3LDADD = $(top_builddir)/src/libt2n.la @BOOST_SERIALIZATION_LIB@ @BOOST_LDFLAGS@
4
5libdefault_la_SOURCES = default_client.cpp
6libother_la_SOURCES = other_client.cpp
7noinst_LTLIBRARIES = libdefault.la libother.la
8
9client_SOURCES = client.cpp
10client_LDADD = $(LDADD) libdefault.la libother.la
11
12server_SOURCES = server.cpp other_server.cpp default_server.cpp other.cpp default.cpp foo.hxx
13
14noinst_PROGRAMS = client server
15
16codegen.stamp: default.cpp other.cpp $(top_builddir)/codegen/codegen
17# assuming we have some unix like shell
18 for i in default other; do \
19 cp -v $(top_srcdir)/codegen/codegen-stubhead.hxx $${i}_common.hxx; \
20 cp -v $(top_srcdir)/codegen/codegen-stubhead.hxx $${i}_server.hxx; \
21 done
22# todo use tmp file for xml file
23 for i in default other; do \
24 gccxml $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) $${i}.cpp -fxml=$${i}.xml; \
25 $(top_builddir)/codegen/codegen $${i}.cpp $${i}.xml $${i}; \
26 done; touch $@
27
28default_common.hxx default_common.cpp default_client.hxx default_client.cpp default_server.hxx default_server.cpp: codegen.stamp
29other_common.hxx other_common.cpp other_client.hxx other_client.cpp other_server.hxx other_server.cpp: codegen.stamp
30
31TESTS = test
32
33
34# TODO:
35# howto generate Makefile(.in) from something like this:
36
37# CMDGROUPS = default other
38
39# default_SOURCES = default-1.cpp default-2.cpp
40# other_SOURCES = other.cpp
41
42# TESTS = test
43
44# server_SOURCES = server.cpp default foo.hxx