try to find workaround for old automake
[libt2n] / example-codegen / Makefile.am
CommitLineData
2c2d29e1 1# not a GNU package. You can remove this line, if
d37ba346 2# you have all needed files, that a GNU package needs
528c5faa 3AUTOMAKE_OPTIONS = foreign
2c2d29e1 4
86c3b9ab 5INCLUDES = @LIBT2N_CFLAGS@
44a58add 6LDADD = @LIBT2N_LIBS@
86c1c2e9 7
6e27f586 8# list your command groups
1f5e9bde
JT
9CMDGROUPS = default other
10
6e27f586 11# for each command group list the files to parse for LIBT2N_EXPORT
c5e54ff2 12default_GROUP = default.cpp
6e27f586 13# example of a command group using multiple cpp files
c5e54ff2
JT
14other_GROUP = other-1.cpp other-2.cpp
15
1e683bb5
JT
16# headers declaring data types used as rpc arguments must be listed manually
17# (in this example the class Foo)
3c4dd222
JT
18include_HEADERS = foo.hxx
19
0cfa3fb2
JT
20# unfortunately we can't set those from variables
21# because they are parsed by automake
22
d0a97d0b
JT
23# we would like to use nodist_ here but our automake is to old
24# nodist_libdefault_la_SOURCES = default_client.cpp
25# nodist_libother_la_SOURCES = other_client.cpp
26
27# using objects as workaround
28libdefault_la_OBJECTS += default_client.lo
29#libdefault_la_SOURCES = default_client.cpp
30libother_la_OBJECTS += other_client.lo
31#libother_la_SOURCES = other_client.cpp
3c4dd222
JT
32lib_LTLIBRARIES = libdefault.la libother.la
33
3c4dd222 34# build an example server and client
86c1c2e9 35client_SOURCES = client.cpp
a96ab628 36client_LDADD = $(LDADD) libdefault.la libother.la
6e27f586 37
86c1c2e9
JT
38noinst_PROGRAMS = client server
39
d0a97d0b
JT
40# we would like to use nodist_ here but our automake is to old
41# nodist_server_SOURCES = other_server.cpp default_server.cpp
42
43server_LDADD = $(LDADD) other_server.$(OBJEXT) default_server.$(OBJEXT)
44
84b484fa 45server_SOURCES = \
d0a97d0b
JT
46 server.cpp $(other_GROUP) $(default_GROUP)
47# other_server.cpp default_server.cpp
48
84b484fa 49
3c4dd222
JT
50# test script
51
52TESTS = test
1f5e9bde 53
5a7380a0
JT
54EXTRA_DIST = $(TESTS) configure.in
55
2c2d29e1 56# if you use libt2n-codegen you should add this
d37ba346
JT
57# (i did not find a nice way to let libt2n install this makefile snippet
58# and let projects using libt2n use the installed version.
59# the core of the problem is:
60# the makefile snippet is already needed when automake is run
61# => no way to let configure locate the snippet)
62include codegen.make