Release: 1.1.1 -> 1.1.2cvs
[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 gnome_fonts= \
38                 l048013t.pfa
39 gnome_cflags=-DGNOME_FONTS="$(gnome_fonts)"
40 # FIXME: GNU make(1) dependency by $(addprefix ...)
41 gnome_bundle_files= \
42                 $(addprefix $(top_srcdir)/fonts/,$(gnome_fonts))
43 endif
44
45 if ENABLE_BUNDLE
46 BUNDLE_SRCS= \
47                 bundle.c \
48                 bundle.h \
49                 bundle-util.c \
50                 bundle-util.h
51 endif
52
53 EXTRA_DIST+= \
54                 bundle.pl
55
56 if HAVE_PERL
57 # FIXME: GNU make(1) dependency by $(addprefix ...)
58 po_files=$(addprefix $(top_builddir)/$(POSUB)/,$(CATALOGS))
59 bundle_files= \
60                 $(top_srcdir)/init.d/$(PACKAGE).init \
61                 $(po_files) \
62                 $(gnome_bundle_files)
63 bundle.c: bundle.pl $(bundle_files)
64         $(PERL) bundle.pl $(bundle_files) >$@
65
66 $(po_files):
67         $(MAKE) -C $(top_builddir)/$(POSUB)
68
69 endif
70
71 udpgate_SOURCES= \
72                 configuration.c \
73                 configuration.h \
74                 main.c \
75                 main.h \
76                 network.c \
77                 network.h \
78                 packet.c \
79                 packet.h \
80                 pathname.c \
81                 pathname.h \
82                 startup-lsb.c \
83                 startup-lsb.h \
84                 startup-chkconfig.c \
85                 startup-chkconfig.h \
86                 startup-debian.c \
87                 startup-debian.h \
88                 startup.c \
89                 startup.h \
90                 static-startup.c \
91                 static-startup.h \
92                 ui-line.c \
93                 ui-line.h \
94                 $(GNOME_SRCS) \
95                 $(BUNDLE_SRCS)
96
97 EXTRA_DIST+= \
98                 $(GLADE_IN)
99
100 udpgate_CFLAGS= \
101                 -DSYSCONFDIR="$(sysconfdir)" \
102                 -DLOCALSTATEDIR="$(localstatedir)" \
103                 -DCATALOGS="$(CATALOGS)" \
104                 $(gnome_cflags)
105 udpgate_LDADD=
106
107 udpgate-ui-gnome-interface.$(OBJEXT): ui-gnome-callbacks.h
108
109 if HAVE_GLADE_WRITESOURCE
110 # touch(1) as 'ui-gnome-callbacks.h' are not overwritten if not changed:
111 $(GLADE_OUT): $(GLADE_IN)
112         sh $(top_srcdir)/macros/glade-w.sh $<
113         @touch ui-gnome-callbacks.h
114
115 endif
116
117 CLEANFILES+= \
118                 ui-gnome-callbacks.c \
119                 ui-gnome.glade.bak \
120                 ui-gnome.gladep.bak
121
122 udpgate_LDADD+=$(POPT_LIBS) $(INTLLIBS)
123
124 # FIXME: /usr/include/gtk-2.0/gtk/gtkitemfactory.h:51: warning: function declaration isn't a prototype
125 # /* We use () here to mean unspecified arguments. This is deprecated
126 #  * as of C99, but we can't change it without breaking compatibility.
127 #  * (Note that if we are included from a C++ program () will mean
128 #  * (void) so an explicit cast will be needed.)
129 #  */
130 # typedef void  (*GtkItemFactoryCallback)  ();
131 # We cannot put '-Wno-strict-prototypes' as we get always overriden by $(CFLAGS) !
132 udpgate_CFLAGS+=$(GNOMEUI_CFLAGS)
133 udpgate_LDADD +=$(GNOMEUI_LIBS)
134
135 bin_PROGRAMS+=udpgate
136
137 EXTRA_DIST+=udpgate.pod.pl.in
138 CLEANFILES+=udpgate.pod udpgate.1
139 if ENABLE_MAN_PAGES
140 udpgate_man_cond=udpgate.1
141 endif
142 man_MANS=$(udpgate_man_cond)