+Option --enable-bundle for the fully static built single-file binary.
[udpgate.git] / src / Makefile.am
index afc9da3..cb6d3ba 100644 (file)
@@ -36,6 +36,23 @@ GNOME_SRCS= \
                $(GLADE_OUT)
 endif
 
+if ENABLE_BUNDLE
+
+nodist_udpgate_SOURCES=bundle.c
+
+BUNDLE_SRCS= \
+               bundle.h
+
+EXTRA_DIST+= \
+               bundle.pl
+
+# FIXME: GNU make(1) dependency by $(addprefix ...)
+bundle_files=$(top_srcdir)/init.d/$(PACKAGE).init $(addprefix $(top_builddir)/$(POSUB)/,$(CATALOGS))
+bundle.c: bundle.pl $(bundle_files)
+               $(PERL) bundle.pl $(bundle_files) >$@
+
+endif
+
 udpgate_SOURCES= \
                configuration.c \
                configuration.h \
@@ -47,7 +64,8 @@ udpgate_SOURCES= \
                packet.h \
                ui-line.c \
                ui-line.h \
-               $(GNOME_SRCS)
+               $(GNOME_SRCS) \
+               $(BUNDLE_SRCS)
 
 EXTRA_DIST+= \
                $(GLADE_IN)