+Option --enable-bundle for the fully static built single-file binary.
[udpgate.git] / src / Makefile.am
1 # $Id$
2 # automake source for UDP Gateway Makefile
3 # Copyright (C) 2004 Jan Kratochvil <project-udpgate@jankratochvil.net>
4
5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; exactly version 2 of June 1991 is required
8
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 # GNU General Public License for more details.
13
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write to the Free Software
16 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
17
18
19 include $(top_srcdir)/Makefile-head.am
20
21 GLADE_IN= \
22                 ui-gnome.glade \
23                 ui-gnome.gladep
24
25 GLADE_OUT= \
26                 ui-gnome-interface.c \
27                 ui-gnome-interface.h \
28                 ui-gnome-callbacks.h \
29                 ui-gnome-support.c \
30                 ui-gnome-support.h
31
32 if HAVE_GNOME
33 GNOME_SRCS= \
34                 ui-gnome.c \
35                 ui-gnome.h \
36                 $(GLADE_OUT)
37 endif
38
39 if ENABLE_BUNDLE
40
41 nodist_udpgate_SOURCES=bundle.c
42
43 BUNDLE_SRCS= \
44                 bundle.h
45
46 EXTRA_DIST+= \
47                 bundle.pl
48
49 # FIXME: GNU make(1) dependency by $(addprefix ...)
50 bundle_files=$(top_srcdir)/init.d/$(PACKAGE).init $(addprefix $(top_builddir)/$(POSUB)/,$(CATALOGS))
51 bundle.c: bundle.pl $(bundle_files)
52                 $(PERL) bundle.pl $(bundle_files) >$@
53
54 endif
55
56 udpgate_SOURCES= \
57                 configuration.c \
58                 configuration.h \
59                 main.c \
60                 main.h \
61                 network.c \
62                 network.h \
63                 packet.c \
64                 packet.h \
65                 ui-line.c \
66                 ui-line.h \
67                 $(GNOME_SRCS) \
68                 $(BUNDLE_SRCS)
69
70 EXTRA_DIST+= \
71                 $(GLADE_IN)
72
73 udpgate_CFLAGS=
74 udpgate_LDADD=
75
76 udpgate-ui-gnome-interface.$(OBJEXT): ui-gnome-callbacks.h
77
78 if HAVE_GLADE_WRITESOURCE
79 # touch(1) as 'ui-gnome-callbacks.h' are not overwritten if not changed:
80 $(GLADE_OUT): $(GLADE_IN)
81         sh $(top_srcdir)/macros/glade-w.sh $<
82         @touch ui-gnome-callbacks.h
83
84 endif
85
86 CLEANFILES+= \
87                 ui-gnome-callbacks.c \
88                 ui-gnome.glade.bak \
89                 ui-gnome.gladep.bak
90
91 udpgate_LDADD+=$(POPT_LIBS) $(INTLLIBS)
92
93 # FIXME: /usr/include/gtk-2.0/gtk/gtkitemfactory.h:51: warning: function declaration isn't a prototype
94 # /* We use () here to mean unspecified arguments. This is deprecated
95 #  * as of C99, but we can't change it without breaking compatibility.
96 #  * (Note that if we are included from a C++ program () will mean
97 #  * (void) so an explicit cast will be needed.)
98 #  */
99 # typedef void  (*GtkItemFactoryCallback)  ();
100 # We cannot put '-Wno-strict-prototypes' as we get always overriden by $(CFLAGS) !
101 udpgate_CFLAGS+=$(GNOMEUI_CFLAGS)
102 udpgate_LDADD +=$(GNOMEUI_LIBS)
103
104 bin_PROGRAMS+=udpgate
105
106 EXTRA_DIST+=udpgate.pod.pl.in
107 CLEANFILES+=udpgate.pod udpgate.1
108 if ENABLE_MAN_PAGES
109 udpgate_man_cond=udpgate.1
110 endif
111 man_MANS=$(udpgate_man_cond)