* When translating the input from a REGI command into a vCard, set the telephone...
[citadel.git] / citadel / Makefile.in
blob9ea36feddf214d05b8175b93cf6c3f01cdddc992
1 # Makefile for Citadel
3 # NOTE: normally you should not have to modify the Makefile. All
4 # system-dependent configuration is in the "configure" script, which
5 # uses "Makefile.in" to generate a "Makefile". In the rare instance
6 # that you have to modify something here, please take note:
7 # 1. Edit Makefile.in, -not- Makefile.
8 # 2. Send e-mail to ajc@uncensored.citadel.org and let me know what you
9 # did, so any necessary changes can be put into the next release.
11 # $Id$
13 ########################################################################
15 TARGETS=@TARGETS@
16 RUN_DIR=@MAKE_RUN_DIR@
17 SPOOL_DIR=@MAKE_SPOOL_DIR@
18 ETC_DIR=@MAKE_ETC_DIR@
19 DATA_DIR=@MAKE_DATA_DIR@
20 STATICDATA_DIR=@MAKE_STATICDATA_DIR@
21 HELP_DIR=@MAKE_HELP_DIR@
22 DOC_DIR=@MAKE_DOC_DIR@
23 UTILBIN_DIR=@MAKE_UTILBIN_DIR@
24 DEPEND_FLAG=@DEPEND_FLAG@
25 all: $(TARGETS)
27 .SUFFIXES: .o .d .c
29 EXEEXT=@EXEEXT@
31 CLIENT_TARGETS=citadel$(EXEEXT) whobbs$(EXEEXT)
32 NOINST_TARGETS=stress$(EXEEXT)
33 SERVER_TARGETS=citserver$(EXEEXT)
34 SERV_MODULES=crc16.o \
35 md5.o \
36 ical_dezonify.o
38 include Make_modules
40 UTIL_TARGETS=citmail$(EXEEXT) sendcommand$(EXEEXT)
42 UTILBIN_TARGETS= base64$(EXEEXT) setup$(EXEEXT) \
43 chkpw$(EXEEXT) chkpwd$(EXEEXT) userlist$(EXEEXT) \
44 getmail$(EXEEXT) aidepost$(EXEEXT) msgform$(EXEEXT)
46 prefix=@prefix@
47 srcdir=@srcdir@
49 ACLOCAL=@ACLOCAL@
50 AUTH=@AUTH@
51 AUTOCONF=@AUTOCONF@
52 chkpwd_LIBS=@chkpwd_LIBS@
53 CC=@CC@
54 CFLAGS=@CFLAGS@ -I ./include/
55 CPPFLAGS=@CPPFLAGS@ -I. -I ./include/
56 DATABASE=@DATABASE@
57 DEFS=@DEFS@
58 LDFLAGS=@LDFLAGS@
59 LIBS=@LIBS@
60 LIBOBJS=@LIBOBJS@
61 INSTALL=@INSTALL@
62 INSTALL_DATA=@INSTALL_DATA@
63 RESOLV=@RESOLV@
64 SHELL=/bin/sh
65 SERVER_LDFLAGS=@SERVER_LDFLAGS@
66 SERVER_LIBS=@SERVER_LIBS@
67 SETUP_LIBS=@SETUP_LIBS@
68 YACC=@YACC@
70 # End configuration section
72 VPATH=$(srcdir)
74 SOURCES=aidepost.c auth.c base64.c chkpwd.c chkpw.c citadel.c citadel_ipc.c \
75 citmail.c citserver.c client_chat.c client_passwords.c \
76 clientsocket.c commands.c config.c control.c $(DATABASE) \
77 domain.c serv_extensions.c file_ops.c genstamp.c getutline.c \
78 housekeeping.c ical_dezonify.c \
79 internet_addressing.c ecrash.c \
80 ipc_c_tcp.c locate_host.c md5.c messages.c \
81 msgbase.c msgform.c parsedate.c policy.c \
82 room_ops.c rooms.c routines.c routines2.c tuiconfig.c euidindex.c \
83 screen.c sendcommand.c getmail.c \
84 server_main.c \
85 setup.c snprintf.c \
86 stress.c support.c sysdep.c user_ops.c userlist.c \
87 whobbs.c \
88 crc16.c journaling.c citadel_dirs.c threads.c
91 include Make_sources
93 svn_revision.c: ${SOURCES}
94 ./mk_svn_revision.sh
96 DEP_FILES=$(SOURCES:.c=.d) modules_init.d modules_upgrade.d
98 noinst: $(NOINST_TARGETS)
99 client: $(CLIENT_TARGETS)
101 server: $(SERVER_TARGETS) $(SERV_MODULES)
103 utils: $(UTIL_TARGETS) $(UTILBIN_TARGETS)
105 citadel$(EXEEXT): citadel.o citadel_ipc.o client_chat.o client_passwords.o \
106 commands.o ipc_c_tcp.o md5.o messages.o rooms.o routines.o \
107 routines2.o tuiconfig.o screen.o citadel_dirs.o ecrash.o $(LIBOBJS)
108 $(CC) citadel.o citadel_ipc.o client_chat.o client_passwords.o \
109 commands.o ipc_c_tcp.o md5.o messages.o rooms.o routines.o \
110 routines2.o tuiconfig.o screen.o citadel_dirs.o ecrash.o $(LIBOBJS) \
111 $(LDFLAGS) -o citadel $(LIBS)
113 .y.c:
114 $(YACC) $(YFLAGS) $<
115 mv -f y.tab.c $@
120 parsedate.o: parsedate.c
122 Make_sources: modules_init.c
124 Make_modules: modules_init.c
126 modules_upgrade.c: modules_init.c
128 SERV_OBJS = server_main.o \
129 user_ops.o citserver.o sysdep.o serv_extensions.o \
130 $(DATABASE:.c=.o) domain.o \
131 control.o policy.o config.o support.o room_ops.o \
132 file_ops.o msgbase.o euidindex.o \
133 locate_host.o housekeeping.o \
134 internet_addressing.o journaling.o \
135 parsedate.o genstamp.o ecrash.o threads.o\
136 clientsocket.o modules_init.o modules_upgrade.o $(AUTH) $(SERV_MODULES) \
137 svn_revision.o
139 citserver$(EXEEXT): $(SERV_OBJS)
140 $(CC) $(SERV_OBJS) $(LDFLAGS) $(SERVER_LDFLAGS) $(LIBS) $(SERVER_LIBS) $(RESOLV) -o citserver$(EXEEXT)
142 .c.o:
143 $(CC) $(CFLAGS) $(CPPFLAGS) $(DEFS) -c $< -o $@
145 aidepost$(EXEEXT): aidepost.o config.o
146 $(CC) aidepost.o config.o citadel_dirs.o $(LDFLAGS) -o aidepost$(EXEEXT) $(LIBS)
148 citmail$(EXEEXT): citmail.o citadel_dirs.o
149 $(CC) citmail.o citadel_dirs.o $(LDFLAGS) -o citmail$(EXEEXT) $(LIBS)
151 # setup does need LIBS defined, because it uses network functions which are in -lsocket -lnsl on Solaris.
152 setup$(EXEEXT): setup.o citadel_dirs.o
153 $(CC) setup.o citadel_dirs.o $(LDFLAGS) -o setup$(EXEEXT) $(LIBS) $(SETUP_LIBS)
155 chkpwd$(EXEEXT): chkpwd.o auth.o
156 $(CC) chkpwd.o auth.o $(LDFLAGS) -o chkpwd$(EXEEXT) $(chkpwd_LIBS)
158 chkpw$(EXEEXT): chkpw.o auth.o citadel_dirs.o
159 $(CC) chkpw.o auth.o citadel_dirs.o $(LDFLAGS) -o chkpw$(EXEEXT) $(chkpwd_LIBS)
161 whobbs$(EXEEXT): whobbs.o ipc_c_tcp.o citadel_ipc.o citadel_dirs.o $(LIBOBJS)
162 $(CC) whobbs.o ipc_c_tcp.o citadel_ipc.o citadel_dirs.o $(LIBOBJS) $(LDFLAGS) -o whobbs$(EXEEXT) $(LIBS)
164 stress$(EXEEXT): stress.o ipc_c_tcp.o citadel_ipc.o citadel_dirs.o $(LIBOBJS)
165 $(CC) stress.o ipc_c_tcp.o citadel_ipc.o citadel_dirs.o $(LIBOBJS) $(LDFLAGS) -o stress$(EXEEXT) $(LIBS)
167 sendcommand$(EXEEXT): sendcommand.o ipc_c_tcp.o citadel_ipc.o config.o $(LIBOBJS)
168 $(CC) sendcommand.o ipc_c_tcp.o citadel_ipc.o config.o \
169 citadel_dirs.o $(LIBOBJS) $(LDFLAGS) -o sendcommand$(EXEEXT) $(LIBS)
171 getmail$(EXEEXT): getmail.o ipc_c_tcp.o citadel_ipc.o config.o $(LIBOBJS)
172 $(CC) getmail.o ipc_c_tcp.o citadel_ipc.o config.o \
173 citadel_dirs.o $(LIBOBJS) $(LDFLAGS) -o getmail$(EXEEXT) $(LIBS)
175 base64$(EXEEXT): base64.o
176 $(CC) base64.o $(LDFLAGS) -o base64$(EXEEXT)
178 userlist$(EXEEXT): userlist.o ipc_c_tcp.o citadel_ipc.o citadel_dirs.o $(LIBOBJS)
179 $(CC) userlist.o ipc_c_tcp.o citadel_ipc.o citadel_dirs.o \
180 $(LIBOBJS) $(LDFLAGS) -o userlist$(EXEEXT) $(LIBS)
182 msgform$(EXEEXT): msgform.o
183 $(CC) msgform.o $(LDFLAGS) -o msgform$(EXEEXT)
185 .PHONY: install-data install-doc install-exec clean cleaner distclean
187 install: install-exec install-data install-doc
188 @echo
189 @echo Installation is complete.
190 @echo Now go to your Citadel directory and run 'setup'.
191 @echo
193 install-new: install-exec-new install-data-new install-doc-new
194 @echo
195 @echo Installation is complete.
196 @echo Now go to your Citadel directory and run 'setup'.
197 @echo
199 upgrade: install-exec install-doc
200 @echo
201 @echo Upgrade is complete.
202 @echo Now go to your Citadel directory and run 'setup'.
203 @echo
205 install-data:
206 @for i in help messages network/spoolin network/spoolout \
207 network/systems; do \
208 $(srcdir)/mkinstalldirs $(DESTDIR)$(prefix)/$$i; \
209 done
210 @for i in citadel.rc public_clients \
211 `find $(srcdir)/help $(srcdir)/messages $(srcdir)/network -type f | grep -v .svn`; do \
212 echo $(INSTALL_DATA) $$i $(DESTDIR)$(prefix)/$$i; \
213 $(INSTALL_DATA) $$i $(DESTDIR)$(prefix)/$$i; \
214 done
215 -@if test -d $(DESTDIR)/etc/pam.d; then \
216 echo $(INSTALL_DATA) $(srcdir)/citadel.pam $(DESTDIR)/etc/pam.d/citadel; \
217 $(INSTALL_DATA) $(srcdir)/citadel.pam $(DESTDIR)/etc/pam.d/citadel; \
220 install-data-new:
221 @for i in network/spoolin network/spoolout network/systems; do \
222 $(srcdir)/mkinstalldirs $(DESTDIR)$(RUN_DIR)/$$i; \
223 done
224 $(srcdir)/mkinstalldirs $(DESTDIR)$(ETC_DIR)/
225 $(INSTALL_DATA) $(srcdir)/public_clients $(DESTDIR)$(ETC_DIR)/public_clients
226 $(INSTALL_DATA) $(srcdir)/citadel.rc $(DESTDIR)$(ETC_DIR)/citadel.rc
227 $(INSTALL_DATA) $(srcdir)/network/mail.aliases $(DESTDIR)$(ETC_DIR)/mail.aliases$
229 $(srcdir)/mkinstalldirs $(DESTDIR)$(STATICDATA_DIR)/messages
230 @for i in \
231 `find $(srcdir)/messages -type f | grep -v .svn`; do \
232 echo $(INSTALL_DATA) $$i $(DESTDIR)$(STATICDATA_DIR)/$$i; \
233 $(INSTALL_DATA) $$i $(DESTDIR)$(STATICDATA_DIR)/$$i; \
234 done
236 $(srcdir)/mkinstalldirs $(DESTDIR)$(HELP_DIR)/help
237 @for i in \
238 `find $(srcdir)/help -type f | grep -v .svn`; do \
239 echo $(INSTALL_DATA) $$i $(DESTDIR)$(HELP_DIR)/$$i; \
240 $(INSTALL_DATA) $$i $(DESTDIR)$(HELP_DIR)/$$i; \
241 done
242 $(srcdir)/mkinstalldirs $(DESTDIR)$(SPOOL_DIR)/network/spoolin
243 $(srcdir)/mkinstalldirs $(DESTDIR)$(SPOOL_DIR)/network/spoolout
244 $(srcdir)/mkinstalldirs $(DESTDIR)$(SPOOL_DIR)/network/systems
245 -@if test -d $(DESTDIR)/etc/pam.d; then \
246 echo $(INSTALL_DATA) $(srcdir)/citadel.pam $(DESTDIR)/etc/pam.d/citadel; \
247 $(INSTALL_DATA) $(srcdir)/citadel.pam $(DESTDIR)/etc/pam.d/citadel; \
249 @for i in bio bitbucket files images info userpics; do \
250 $(srcdir)/mkinstalldirs $(DESTDIR)$(DATA_DIR)/$$i; \
251 done
253 install-doc:
254 @$(srcdir)/mkinstalldirs $(DESTDIR)$(prefix)/docs
255 @for i in `find $(srcdir)/docs -type f | grep -v .svn`; do \
256 echo $(INSTALL_DATA) $$i $(DESTDIR)$(prefix)/$$i; \
257 $(INSTALL_DATA) $$i $(DESTDIR)$(prefix)/$$i; \
258 done
259 @$(srcdir)/mkinstalldirs $(DESTDIR)$(prefix)/techdoc
260 @for i in `find $(srcdir)/techdoc -type f | grep -v .svn`; do \
261 echo $(INSTALL_DATA) $$i $(DESTDIR)$(prefix)/$$i; \
262 $(INSTALL_DATA) $$i $(DESTDIR)$(prefix)/$$i; \
263 done
264 @for i in `cd openldap; find $(srcdir)/ -type f | grep -v .svn`; do \
265 echo $(INSTALL_DATA) openldap/$$i $(DESTDIR)$(prefix)/$$i; \
266 $(INSTALL_DATA) openldap/$$i $(DESTDIR)$(prefix)/$$i; \
267 done
268 echo $(INSTALL_DATA) README.txt $(DESTDIR)$(prefix)/README.txt
269 $(INSTALL_DATA) README.txt $(DESTDIR)$(prefix)/README.txt
271 install-doc-new:
272 @$(srcdir)/mkinstalldirs $(DESTDIR)$(DOC_DIR)/docs
273 @for i in `find $(srcdir)/docs -type f | grep -v .svn`; do \
274 echo $(INSTALL_DATA) $$i $(DESTDIR)$(DOC_DIR)/$$i; \
275 $(INSTALL_DATA) $$i $(DESTDIR)$(DOC_DIR)/$$i; \
276 done
277 @$(srcdir)/mkinstalldirs $(DESTDIR)$(DOC_DIR)/techdoc
278 @for i in `find $(srcdir)/techdoc -type f | grep -v .svn`; do \
279 echo $(INSTALL_DATA) $$i $(DESTDIR)$(DOC_DIR)/$$i; \
280 $(INSTALL_DATA) $$i $(DESTDIR)$(DOC_DIR)/$$i; \
281 done
282 @for i in `cd openldap; find $(srcdir)/ -type f | grep -v .svn`; do \
283 echo $(INSTALL_DATA) $$i $(DESTDIR)$(DOC_DIR)/$$i; \
284 $(INSTALL_DATA) openldap/$$i $(DESTDIR)$(DOC_DIR)/$$i; \
285 done
286 $(INSTALL_DATA) README.txt $(DESTDIR)$(DOC_DIR)/README.txt
288 install-exec: all
289 @for i in bio bitbucket files images info userpics; do \
290 $(srcdir)/mkinstalldirs $(DESTDIR)$(prefix)/$$i; \
291 done
292 @for i in $(CLIENT_TARGETS) $(SERVER_TARGETS) $(UTIL_TARGETS) $(UTILBIN_TARGETS); do \
293 if test -f $$i; then \
294 echo $(INSTALL) $$i $(DESTDIR)$(prefix)/$$i; \
295 $(INSTALL) $$i $(DESTDIR)$(prefix)/$$i; \
296 fi \
297 done
298 $(srcdir)/mkinstalldirs $(DESTDIR)$(prefix)/unstripped
299 cp $(SERVER_TARGETS) $(DESTDIR)$(prefix)/unstripped/
301 @for i in utilsmenu database_cleanup.sh migrate_aliases.sh citadel-openldap.schema; do \
302 if test -f $(srcdir)/$$i; then \
303 echo $(INSTALL) $(srcdir)/$$i $(DESTDIR)$(prefix)/$$i; \
304 $(INSTALL) $(srcdir)/$$i $(DESTDIR)$(prefix)/$$i; \
305 fi \
306 done
308 install-exec-new: all
309 $(srcdir)/mkinstalldirs $(DESTDIR)/usr/sbin;
310 $(srcdir)/mkinstalldirs $(DESTDIR)/usr/bin;
311 $(srcdir)/mkinstalldirs $(DESTDIR)/usr/bin;
312 $(srcdir)/mkinstalldirs $(DESTDIR)$(UTILBIN_DIR);
313 $(srcdir)/mkinstalldirs $(DESTDIR)$(DOC_DIR);
314 @for i in $(SERVER_TARGETS) $(UTIL_TARGETS); do \
315 if test -f $$i; then \
316 echo $(INSTALL) $$i $(DESTDIR)/usr/sbin/$$i; \
317 $(INSTALL) $$i $(DESTDIR)/usr/sbin/$$i; \
318 fi \
319 done
320 cp citserver $(DESTDIR)/$(UTILBIN_DIR)/citserver.unstripped
321 cp migrate_aliases.sh $(DESTDIR)/$(UTILBIN_DIR)/
322 @for i in $(UTILBIN_TARGETS); do \
323 if test -f $$i; then \
324 echo $(INSTALL) $$i $(DESTDIR)/$(UTILBIN_DIR)/$$i; \
325 $(INSTALL) $$i $(DESTDIR)/$(UTILBIN_DIR)/$$i; \
326 fi \
327 done
329 $(INSTALL) citmail $(DESTDIR)/usr/sbin/sendmail;
330 @for i in $(CLIENT_TARGETS); do \
331 if test -f $$i; then \
332 echo $(INSTALL) $$i $(DESTDIR)/usr/bin/$$i; \
333 $(INSTALL) $$i $(DESTDIR)/usr/bin/$$i; \
334 fi \
335 done
336 @for i in utilsmenu database_cleanup.sh citadel-openldap.schema ; do \
337 if test -f $(srcdir)/$$i; then \
338 echo $(INSTALL) $(srcdir)/$$i $(DESTDIR)$(DOC_DIR)/$$i; \
339 $(INSTALL) $(srcdir)/$$i $(DESTDIR)$(DOC_DIR)/$$i; \
340 fi \
341 done
343 clean:
344 rm -f *.o
345 for i in $(srcdir)/modules/* ; do \
346 rm -f $$i/*.o ;\
347 done
348 rm -f $(CLIENT_TARGETS) $(SERVER_TARGETS) $(UTIL_TARGETS) $(UTILBIN_TARGETS) $(NOINST_TARGETS)
351 cleaner: clean
352 rm -rf $(CLIENT_TARGETS) $(SERVER_TARGETS) $(UTIL_TARGETS) $(UTILBIN_TARGETS) $(NOINST_TARGETS) database_cleanup.sh *.la
353 rm -rf modules_upgrade.c modules_init.c modules_init.h Make_modules Make_sources
355 distclean: cleaner
356 find . -name '*~' -o -name '.#*' | xargs rm -f
357 rm -f Makefile sysdep.h config.cache config.log config.status *.d
358 for i in $(srcdir)/modules/* ; do \
359 rm -f $$i/*.d ;\
360 done
362 .c.d:
363 @echo Checking dependencies for $<
364 @$(CC) $(DEPEND_FLAG) $(CPPFLAGS) $< | sed -e 's!$*.o!$*.o $*/.o $@!' > $@
365 @test -s $@ || rm -f $@
367 Makefile: $(srcdir)/Makefile.in config.status
368 CONFIG_FILES=Makefile CONFIG_HEADERS= $(SHELL) ./config.status
370 config.status: $(srcdir)/configure
371 $(SHELL) ./config.status --recheck
373 $(srcdir)/configure: $(srcdir)/configure.ac $(srcdir)/aclocal.m4
374 cd $(srcdir) && $(AUTOCONF)
376 $(srcdir)/aclocal.m4: $(srcdir)/acinclude.m4
377 cd $(srcdir) && $(ACLOCAL)
379 -include $(DEP_FILES)