fixes init script for non ipv6 enabled systems #472755
[packages/xinetd.git] / xinetd / Makefile.in
1 # (c) Copyright 1992 by Panagiotis Tsirigotis
2 # All rights reserved.  The file named COPYRIGHT specifies the terms 
3 # and conditions for redistribution.
4
5 #
6 # $Id: Makefile.in,v 1.6 2005/03/30 23:15:28 bbraun Exp $
7 #
8 # Based on Program makefile template: *Revision: 1.14 *
9 #
10
11 #
12 # Available entries:
13 #       $(NAME)         --> create the program (this is the default target)
14 #       install         --> install the program (and man page)
15 #       uninstall       --> uninstall the program (and man page)
16 #       clean                   --> cleanup
17 #
18
19 NAME            = xinetd
20 VPATH           = @srcdir@
21 SRCDIR          = @srcdir@
22 TOPSRC          = @top_srcdir@
23
24 # Available debug flags:
25 #     DEBUG                      code is being debugged
26 #     DEBUG_SERVER               forked server will do a sleep
27 #     DEBUG_INTERCEPTOR          forked interceptor will do a sleep
28 #     DEBUG_SIGNALS              code that handles SIGSEGV and SIGBUS
29 #     DEBUG_LOGGING              forked logging server will do a sleep
30 #     DEBUG_SHUTDOWN             forked shutdown server will do a sleep
31 #     DEBUG_TPCINT               enable debugging code in the tcp interceptor
32 #     DEBUG_UDPINT               enable debugging code in the udp interceptor
33 #     DEBUG_DAEMON               debug xinetd when not invoked with -d option
34 #     DEBUG_RETRY                debug the server retry code
35 #
36
37 DEFS        = @DEFS@
38
39 PREFIX      = @prefix@
40
41 INSTALL_CMD = @INSTALL@
42
43 LIBS        = -lsio -lmisc -lxlog -lportable -lstr -lpset @LIBS@
44
45 INCLUDEDIR  = -I../libs/include
46 LIBDIR      = -L../libs/lib
47
48 LDFLAGS     = @LDFLAGS@ $(LIBDIR) 
49 CFLAGS      = $(INCLUDEDIR) @CFLAGS@ @DEFS@ -Wall
50
51 HDRS     = \
52                 access.h \
53                 addr.h \
54                 attr.h \
55                 builtins.h \
56                 conf.h \
57                 xconfig.h \
58                 connection.h \
59                 defs.h \
60                 inet.h \
61                 int.h \
62                 log.h \
63                 mask.h \
64                 parse.h \
65                 sconst.h \
66                 sconf.h \
67                 sensor.h \
68                 server.h \
69                 service.h \
70                 state.h \
71                 xtimer.h
72
73 SRCS     = \
74                 access.c addr.c \
75                 builtins.c \
76                 child.c conf.c confparse.c connection.c \
77                 env.c \
78                 ident.c init.c int.c intcommon.c internals.c \
79                 log.c logctl.c \
80                 main.c msg.c \
81                 nvlists.c \
82                 parse.c parsesup.c parsers.c \
83                 reconfig.c retry.c \
84                 sconf.c sensor.c server.c service.c \
85                 signals.c special.c \
86                 tcpint.c time.c \
87                 udpint.c util.c redirect.c \
88                 xgetloadavg.c includedir.c xtimer.c inet.c xmdns.c
89
90 OBJS     = \
91                 access.o addr.o \
92                 builtins.o \
93                 child.o conf.o confparse.o connection.o \
94                 env.o \
95                 ident.o init.o int.o intcommon.o internals.o \
96                 log.o logctl.o \
97                 main.o msg.o \
98                 nvlists.o \
99                 parse.o parsesup.o parsers.o \
100                 reconfig.o retry.o \
101                 sconf.o sensor.o server.o service.o \
102                 signals.o special.o \
103                 tcpint.o time.o \
104                 udpint.o util.o redirect.o \
105                 xgetloadavg.o options.o includedir.o xtimer.o inet.o xmdns.o
106
107 XMODE           = -m 700        # mode for executables
108 FMODE           = -m 640        # mode for anything but executables
109 INSTALL         = @INSTALL@
110
111 #
112 # The following variables do not need to be changed
113 #
114
115
116 all: xinetd itox
117
118 itox: itox.c
119         $(CC) $(CFLAGS) $(DEBUG) $(SRCDIR)/itox.c -o $@ $(LDFLAGS) $(LIBS)
120
121 xinetd: $(OBJS)
122         $(CC) $(CFLAGS) $(DEBUG) -o $@ $(OBJS) $(LDFLAGS) $(LIBS) || rm -f $@
123
124 clean:
125         rm -f $(OBJS) $(NAME) core itox
126         rm -f *.swp 
127         rm -f *.?~ 
128
129 distclean: clean
130         rm -f Makefile
131
132 install: $(NAME)
133         $(INSTALL) $(XMODE) $(NAME) $(INSTALLDIR)
134
135 install.man:
136         if test "$(MANPROGDIR)" ; then \
137                 $(INSTALL) $(FMODE) $(MANPROGFILE) $(MANPROGDIR)/$(MANPROGPAGE) ;\
138         fi
139         if test "$(MANDATADIR)" ; then \
140                 for i in $(MANDATANAMES) ; do \
141                         name=$(NAME).$$i ; \
142                         $(INSTALL) $(FMODE) $$name.man $(MANDATADIR)/$$name.$(MANDATASECTION);\
143                 done ;\
144         fi
145
146 uninstall:
147         a=`pwd` ; cd $(INSTALLDIR) ;\
148         if test $$a != `pwd` ; then rm -f $(NAME) ; fi
149         a=`pwd` ; cd $(MANPROGDIR) ;\
150         if test $$a != `pwd` ; then rm -f $(MANPROGPAGE) ; fi
151         a=`pwd` ; cd $(MANDATADIR) ;\
152         if test $$a != `pwd` ; then \
153                 for i in $(MANDATANAMES) ; do \
154                         rm -f $(NAME).$$i.$(MANDATASECTION) ;\
155                 done ;\
156         fi
157
158 #
159 # Header file dependencies
160 #
161 $(SRCDIR)/addr.h: defs.h
162         @if test -f $@ ; then touch $@ ; else echo $@ is missing ; exit 1 ; fi
163
164 $(SRCDIR)/builtins.h: defs.h
165         @if test -f $@ ; then touch $@ ; else echo $@ is missing ; exit 1 ; fi
166
167 $(SRCDIR)/conf.h: service.h
168         @if test -f $@ ; then touch $@ ; else echo $@ is missing ; exit 1 ; fi
169
170 $(SRCDIR)/int.h: server.h
171         @if test -f $@ ; then touch $@ ; else echo $@ is missing ; exit 1 ; fi
172
173 $(SRCDIR)/parse.h: defs.h
174         @if test -f $@ ; then touch $@ ; else echo $@ is missing ; exit 1 ; fi
175
176 $(SRCDIR)/sconf.h: defs.h log.h mask.h
177         @if test -f $@ ; then touch $@ ; else echo $@ is missing ; exit 1 ; fi
178
179 $(SRCDIR)/sensor.h: defs.h service.h
180         @if test -f $@ ; then touch $@ ; else echo $@ is missing ; exit 1 ; fi
181
182 $(SRCDIR)/server.h: defs.h service.h connection.h
183         @if test -f $@ ; then touch $@ ; else echo $@ is missing ; exit 1 ; fi
184
185 $(SRCDIR)/service.h: defs.h sconf.h builtins.h
186         @if test -f $@ ; then touch $@ ; else echo $@ is missing ; exit 1 ; fi
187
188 $(SRCDIR)/state.h: mask.h sconf.h conf.h
189         @if test -f $@ ; then touch $@ ; else echo $@ is missing ; exit 1 ; fi
190
191 $(SRCDIR)/connection.h: mask.h service.h
192         @if test -f $@ ; then touch $@ ; else echo $@ is missing ; exit 1 ; fi
193
194 #
195 # Object file dependencies
196 #
197 access.o:       access.h addr.h connection.h sensor.h service.h state.h msg.h
198 addr.o:         addr.h defs.h msg.h
199 builtins.o:     builtins.h xconfig.h defs.h sconf.h server.h msg.h
200 child.o:        attr.h xconfig.h sconst.h server.h state.h msg.h $(OPT_HEADER)
201 conf.o:         attr.h conf.h xconfig.h defs.h service.h state.h msg.h
202 confparse.o:    attr.h xconfig.h conf.h defs.h parse.h sconst.h \
203                 sconf.h sensor.h state.h msg.h
204 connection.o:   connection.h service.h state.h msg.h
205 sconf.o:        addr.h attr.h defs.h sconf.h state.h
206 env.o:          attr.h defs.h sconf.h msg.h
207 ident.o:        defs.h sconst.h server.h msg.h
208 includedir.o:   parse.h msg.h
209 inet.o:         parse.h parsesup.h msg.h
210 init.o:         defs.h conf.h xconfig.h state.h msg.h $(OPT_HEADER)
211 int.o:          xconfig.h connection.h defs.h int.h server.h service.h msg.h
212 intcommon.o:    xconfig.h defs.h int.h server.h service.h state.h msg.h
213 internals.o:    xconfig.h server.h service.h state.h msg.h
214 log.o:          access.h defs.h connection.h sconst.h server.h service.h msg.h
215 logctl.o:       xconfig.h defs.h log.h service.h state.h msg.h
216 main.o:         service.h state.h msg.h $(OPT_HEADER)
217 msg.o:          xconfig.h defs.h state.h $(OPT_HEADER)
218 nvlists.o:      defs.h sconf.h
219 parse.o:        addr.h attr.h conf.h defs.h parse.h service.h msg.h
220 parsers.o:      addr.h xconfig.h defs.h parse.h sconf.h msg.h
221 parsesup.o:     defs.h parse.h msg.h
222 reconfig.o:     access.h conf.h xconfig.h defs.h server.h service.h state.h \
223                 msg.h
224 redirect.o:     service.h log.h sconf.h msg.h
225 retry.o:        access.h xconfig.h connection.h server.h state.h msg.h
226 sensor.o:       addr.h msg.h sconf.h server.h xconfig.h xtimer.h
227 server.o:       access.h xconfig.h connection.h server.h state.h msg.h
228 service.o:      access.h attr.h xconfig.h connection.h defs.h \
229                         server.h service.h state.h msg.h $(OPT_HEADER)
230 signals.o:      xconfig.h defs.h state.h msg.h
231 special.o:      builtins.h conf.h xconfig.h connection.h server.h sconst.h \
232                 state.h msg.h $(OPT_HEADER)
233 tcpint.o:       access.h xconfig.h defs.h int.h msg.h
234 time.o:         defs.h msg.h
235 udpint.o:       access.h defs.h int.h msg.h
236 util.o:         xconfig.h defs.h msg.h
237 xtimer.o:       msg.h