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