added examples
[libt2n] / examples-codegen / example1 / Makefile.am
diff --git a/examples-codegen/example1/Makefile.am b/examples-codegen/example1/Makefile.am
new file mode 100644 (file)
index 0000000..32dc2fe
--- /dev/null
@@ -0,0 +1,33 @@
+# not a GNU package. You can remove this line, if you have all needed files, that a GNU package needs
+AUTOMAKE_OPTIONS = foreign
+
+# our dependencies
+INCLUDES = @LIBT2N_CFLAGS@
+LDADD = @LIBT2N_LIBS@
+
+# list your command groups (seperated by spaces)
+CMDGROUPS = t2nexample
+
+# for each command group list the files to parse for LIBT2N_EXPORT
+t2nexample_GROUP = t2nexample.cpp
+
+# unfortunately we can't set those from variables (because they are parsed by automake)
+
+# for each group build a client library from generated source file(s)
+# (if you have automake >= 1.5 you might wish to use nodist_ here)
+# Note: the library name must match the group name
+libt2nexample_la_SOURCES = t2nexample_client.cpp
+lib_LTLIBRARIES = libt2nexample.la
+
+# build server program
+bin_PROGRAMS = libt2n-example1-server
+
+# (if you have automake >= 1.5 you might wish to use nodist_ here)
+# nodist_server_SOURCES = t2nexample_server.cpp
+
+libt2n_example1_server_SOURCES = \
+       server.cpp $(t2nexample_GROUP) \
+       t2nexample_server.cpp
+
+# include Makefile snippet doing all the magic
+include codegen.make