+Option --enable-bundle for the fully static built single-file binary.
[udpgate.git] / src / Makefile.am
index 59e0d8f..cb6d3ba 100644 (file)
@@ -29,18 +29,43 @@ GLADE_OUT= \
                ui-gnome-support.c \
                ui-gnome-support.h
 
+if HAVE_GNOME
+GNOME_SRCS= \
+               ui-gnome.c \
+               ui-gnome.h \
+               $(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 \
                main.c \
                main.h \
                network.c \
                network.h \
                packet.c \
                packet.h \
-               ui-gnome.c \
-               ui-gnome.h \
                ui-line.c \
                ui-line.h \
-               $(GLADE_OUT)
+               $(GNOME_SRCS) \
+               $(BUNDLE_SRCS)
 
 EXTRA_DIST+= \
                $(GLADE_IN)
@@ -63,7 +88,7 @@ CLEANFILES+= \
                ui-gnome.glade.bak \
                ui-gnome.gladep.bak
 
-udpgate_LDADD+= $(POPT_LIBS) $(INTLLIBS)
+udpgate_LDADD+=$(POPT_LIBS) $(INTLLIBS)
 
 # FIXME: /usr/include/gtk-2.0/gtk/gtkitemfactory.h:51: warning: function declaration isn't a prototype
 # /* We use () here to mean unspecified arguments. This is deprecated