* Fixed problems related to saving vCards in config rooms. For starters, we were...
[citadel.git] / citadel / Makefile.in
bloba7a3f049d9f0485befa68cee5ffbed71cdc4d28f
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= md5.o \
35 ical_dezonify.o
37 include Make_modules
39 UTIL_TARGETS=citmail$(EXEEXT) sendcommand$(EXEEXT)
41 UTILBIN_TARGETS= base64$(EXEEXT) setup$(EXEEXT) \
42 chkpw$(EXEEXT) chkpwd$(EXEEXT) userlist$(EXEEXT) \
43 getmail$(EXEEXT) aidepost$(EXEEXT) msgform$(EXEEXT)
45 prefix=@prefix@
46 srcdir=@srcdir@
48 ACLOCAL=@ACLOCAL@
49 AUTH=@AUTH@
50 AUTOCONF=@AUTOCONF@
51 chkpwd_LIBS=@chkpwd_LIBS@
52 CC=@CC@
53 CFLAGS=@CFLAGS@ -I ./include/
54 CPPFLAGS=@CPPFLAGS@ -I. -I ./include/
55 DATABASE=@DATABASE@
56 DEFS=@DEFS@
57 LDFLAGS=@LDFLAGS@
58 LIBS=@LIBS@
59 LIBOBJS=@LIBOBJS@
60 INSTALL=@INSTALL@
61 INSTALL_DATA=@INSTALL_DATA@
62 RESOLV=@RESOLV@
63 SHELL=/bin/sh
64 SERVER_LDFLAGS=@SERVER_LDFLAGS@
65 SERVER_LIBS=@SERVER_LIBS@
66 SETUP_LIBS=@SETUP_LIBS@
67 YACC=@YACC@
69 # End configuration section
71 VPATH=$(srcdir)
73 SOURCES=aidepost.c auth.c base64.c chkpwd.c chkpw.c citadel.c citadel_ipc.c \
74 citmail.c citserver.c client_chat.c client_passwords.c \
75 clientsocket.c commands.c config.c control.c $(DATABASE) \
76 domain.c serv_extensions.c file_ops.c genstamp.c getutline.c \
77 housekeeping.c ical_dezonify.c \
78 internet_addressing.c ecrash.c \
79 ipc_c_tcp.c locate_host.c md5.c messages.c \
80 msgbase.c msgform.c parsedate.c policy.c \
81 room_ops.c rooms.c routines.c routines2.c tuiconfig.c euidindex.c \
82 screen.c sendcommand.c getmail.c \
83 server_main.c \
84 setup.c snprintf.c \
85 stress.c support.c sysdep.c user_ops.c userlist.c \
86 whobbs.c \
87 journaling.c citadel_dirs.c threads.c
90 include Make_sources
92 svn_revision.c: ${SOURCES}
93 ./mk_svn_revision.sh
95 DEP_FILES=$(SOURCES:.c=.d) modules_init.d modules_upgrade.d
97 noinst: $(NOINST_TARGETS)
98 client: $(CLIENT_TARGETS)
100 server: $(SERVER_TARGETS) $(SERV_MODULES)
102 utils: $(UTIL_TARGETS) $(UTILBIN_TARGETS)
104 citadel$(EXEEXT): citadel.o citadel_ipc.o client_chat.o client_passwords.o \
105 commands.o ipc_c_tcp.o md5.o messages.o rooms.o routines.o \
106 routines2.o tuiconfig.o screen.o citadel_dirs.o ecrash.o $(LIBOBJS)
107 $(CC) citadel.o citadel_ipc.o client_chat.o client_passwords.o \
108 commands.o ipc_c_tcp.o md5.o messages.o rooms.o routines.o \
109 routines2.o tuiconfig.o screen.o citadel_dirs.o ecrash.o $(LIBOBJS) \
110 $(LDFLAGS) -o citadel $(LIBS)
112 .y.c:
113 $(YACC) $(YFLAGS) $<
114 mv -f y.tab.c $@
119 parsedate.o: parsedate.c
121 Make_sources: modules_init.c
123 Make_modules: modules_init.c
125 modules_upgrade.c: modules_init.c
127 SERV_OBJS = server_main.o \
128 user_ops.o citserver.o sysdep.o serv_extensions.o \
129 $(DATABASE:.c=.o) domain.o \
130 control.o policy.o config.o support.o room_ops.o \
131 file_ops.o msgbase.o euidindex.o \
132 locate_host.o housekeeping.o \
133 internet_addressing.o journaling.o \
134 parsedate.o genstamp.o ecrash.o threads.o\
135 clientsocket.o modules_init.o modules_upgrade.o $(AUTH) $(SERV_MODULES) \
136 svn_revision.o
138 citserver$(EXEEXT): $(SERV_OBJS)
139 $(CC) $(SERV_OBJS) $(LDFLAGS) $(SERVER_LDFLAGS) $(LIBS) $(SERVER_LIBS) $(RESOLV) -o citserver$(EXEEXT)
141 .c.o:
142 $(CC) $(CFLAGS) $(CPPFLAGS) $(DEFS) -c $< -o $@
144 aidepost$(EXEEXT): aidepost.o config.o
145 $(CC) aidepost.o config.o citadel_dirs.o $(LDFLAGS) -o aidepost$(EXEEXT) $(LIBS)
147 citmail$(EXEEXT): citmail.o citadel_dirs.o
148 $(CC) citmail.o citadel_dirs.o $(LDFLAGS) -o citmail$(EXEEXT) $(LIBS)
150 # setup does need LIBS defined, because it uses network functions which are in -lsocket -lnsl on Solaris.
151 setup$(EXEEXT): setup.o citadel_dirs.o
152 $(CC) setup.o citadel_dirs.o $(LDFLAGS) -o setup$(EXEEXT) $(LIBS) $(SETUP_LIBS)
154 chkpwd$(EXEEXT): chkpwd.o auth.o
155 $(CC) chkpwd.o auth.o $(LDFLAGS) -o chkpwd$(EXEEXT) $(chkpwd_LIBS)
157 chkpw$(EXEEXT): chkpw.o auth.o citadel_dirs.o
158 $(CC) chkpw.o auth.o citadel_dirs.o $(LDFLAGS) -o chkpw$(EXEEXT) $(chkpwd_LIBS)
160 whobbs$(EXEEXT): whobbs.o ipc_c_tcp.o citadel_ipc.o citadel_dirs.o $(LIBOBJS)
161 $(CC) whobbs.o ipc_c_tcp.o citadel_ipc.o citadel_dirs.o $(LIBOBJS) $(LDFLAGS) -o whobbs$(EXEEXT) $(LIBS)
163 stress$(EXEEXT): stress.o ipc_c_tcp.o citadel_ipc.o citadel_dirs.o $(LIBOBJS)
164 $(CC) stress.o ipc_c_tcp.o citadel_ipc.o citadel_dirs.o $(LIBOBJS) $(LDFLAGS) -o stress$(EXEEXT) $(LIBS)
166 sendcommand$(EXEEXT): sendcommand.o ipc_c_tcp.o citadel_ipc.o config.o $(LIBOBJS)
167 $(CC) sendcommand.o ipc_c_tcp.o citadel_ipc.o config.o \
168 citadel_dirs.o $(LIBOBJS) $(LDFLAGS) -o sendcommand$(EXEEXT) $(LIBS)
170 getmail$(EXEEXT): getmail.o ipc_c_tcp.o citadel_ipc.o config.o $(LIBOBJS)
171 $(CC) getmail.o ipc_c_tcp.o citadel_ipc.o config.o \
172 citadel_dirs.o $(LIBOBJS) $(LDFLAGS) -o getmail$(EXEEXT) $(LIBS)
174 base64$(EXEEXT): base64.o
175 $(CC) base64.o $(LDFLAGS) -o base64$(EXEEXT)
177 userlist$(EXEEXT): userlist.o ipc_c_tcp.o citadel_ipc.o citadel_dirs.o $(LIBOBJS)
178 $(CC) userlist.o ipc_c_tcp.o citadel_ipc.o citadel_dirs.o \
179 $(LIBOBJS) $(LDFLAGS) -o userlist$(EXEEXT) $(LIBS)
181 msgform$(EXEEXT): msgform.o
182 $(CC) msgform.o $(LDFLAGS) -o msgform$(EXEEXT)
184 .PHONY: install-data install-doc install-exec clean cleaner distclean
186 install: install-exec install-data install-doc
187 @echo
188 @echo Installation is complete.
189 @echo Now go to your Citadel directory and run 'setup'.
190 @echo
192 install-new: install-exec-new install-data-new install-doc-new
193 @echo
194 @echo Installation is complete.
195 @echo Now go to your Citadel directory and run 'setup'.
196 @echo
198 upgrade: install-exec install-doc
199 @echo
200 @echo Upgrade is complete.
201 @echo Now go to your Citadel directory and run 'setup'.
202 @echo
204 install-data:
205 @for i in help messages network/spoolin network/spoolout \
206 network/systems; do \
207 $(srcdir)/mkinstalldirs $(DESTDIR)$(prefix)/$$i; \
208 done
209 @for i in citadel.rc public_clients \
210 `find $(srcdir)/help $(srcdir)/messages $(srcdir)/network -type f | grep -v .svn`; do \
211 echo $(INSTALL_DATA) $$i $(DESTDIR)$(prefix)/$$i; \
212 $(INSTALL_DATA) $$i $(DESTDIR)$(prefix)/$$i; \
213 done
214 -@if test -d $(DESTDIR)/etc/pam.d; then \
215 echo $(INSTALL_DATA) $(srcdir)/citadel.pam $(DESTDIR)/etc/pam.d/citadel; \
216 $(INSTALL_DATA) $(srcdir)/citadel.pam $(DESTDIR)/etc/pam.d/citadel; \
219 install-data-new:
220 @for i in network/spoolin network/spoolout network/systems; do \
221 $(srcdir)/mkinstalldirs $(DESTDIR)$(RUN_DIR)/$$i; \
222 done
223 $(srcdir)/mkinstalldirs $(DESTDIR)$(ETC_DIR)/
224 $(INSTALL_DATA) $(srcdir)/public_clients $(DESTDIR)$(ETC_DIR)/public_clients
225 $(INSTALL_DATA) $(srcdir)/citadel.rc $(DESTDIR)$(ETC_DIR)/citadel.rc
226 $(INSTALL_DATA) $(srcdir)/network/mail.aliases $(DESTDIR)$(ETC_DIR)/mail.aliases$
228 $(srcdir)/mkinstalldirs $(DESTDIR)$(STATICDATA_DIR)/messages
229 @for i in \
230 `find $(srcdir)/messages -type f | grep -v .svn`; do \
231 echo $(INSTALL_DATA) $$i $(DESTDIR)$(STATICDATA_DIR)/$$i; \
232 $(INSTALL_DATA) $$i $(DESTDIR)$(STATICDATA_DIR)/$$i; \
233 done
235 $(srcdir)/mkinstalldirs $(DESTDIR)$(HELP_DIR)/help
236 @for i in \
237 `find $(srcdir)/help -type f | grep -v .svn`; do \
238 echo $(INSTALL_DATA) $$i $(DESTDIR)$(HELP_DIR)/$$i; \
239 $(INSTALL_DATA) $$i $(DESTDIR)$(HELP_DIR)/$$i; \
240 done
241 $(srcdir)/mkinstalldirs $(DESTDIR)$(SPOOL_DIR)/network/spoolin
242 $(srcdir)/mkinstalldirs $(DESTDIR)$(SPOOL_DIR)/network/spoolout
243 $(srcdir)/mkinstalldirs $(DESTDIR)$(SPOOL_DIR)/network/systems
244 -@if test -d $(DESTDIR)/etc/pam.d; then \
245 echo $(INSTALL_DATA) $(srcdir)/citadel.pam $(DESTDIR)/etc/pam.d/citadel; \
246 $(INSTALL_DATA) $(srcdir)/citadel.pam $(DESTDIR)/etc/pam.d/citadel; \
248 @for i in bio bitbucket files images info userpics; do \
249 $(srcdir)/mkinstalldirs $(DESTDIR)$(DATA_DIR)/$$i; \
250 done
252 install-doc:
253 @$(srcdir)/mkinstalldirs $(DESTDIR)$(prefix)/docs
254 @for i in `find $(srcdir)/docs -type f | grep -v .svn`; do \
255 echo $(INSTALL_DATA) $$i $(DESTDIR)$(prefix)/$$i; \
256 $(INSTALL_DATA) $$i $(DESTDIR)$(prefix)/$$i; \
257 done
258 @$(srcdir)/mkinstalldirs $(DESTDIR)$(prefix)/techdoc
259 @for i in `find $(srcdir)/techdoc -type f | grep -v .svn`; do \
260 echo $(INSTALL_DATA) $$i $(DESTDIR)$(prefix)/$$i; \
261 $(INSTALL_DATA) $$i $(DESTDIR)$(prefix)/$$i; \
262 done
263 @for i in `cd openldap; find $(srcdir)/ -type f | grep -v .svn`; do \
264 echo $(INSTALL_DATA) openldap/$$i $(DESTDIR)$(prefix)/$$i; \
265 $(INSTALL_DATA) openldap/$$i $(DESTDIR)$(prefix)/$$i; \
266 done
267 echo $(INSTALL_DATA) README.txt $(DESTDIR)$(prefix)/README.txt
268 $(INSTALL_DATA) README.txt $(DESTDIR)$(prefix)/README.txt
270 install-doc-new:
271 @$(srcdir)/mkinstalldirs $(DESTDIR)$(DOC_DIR)/docs
272 @for i in `find $(srcdir)/docs -type f | grep -v .svn`; do \
273 echo $(INSTALL_DATA) $$i $(DESTDIR)$(DOC_DIR)/$$i; \
274 $(INSTALL_DATA) $$i $(DESTDIR)$(DOC_DIR)/$$i; \
275 done
276 @$(srcdir)/mkinstalldirs $(DESTDIR)$(DOC_DIR)/techdoc
277 @for i in `find $(srcdir)/techdoc -type f | grep -v .svn`; do \
278 echo $(INSTALL_DATA) $$i $(DESTDIR)$(DOC_DIR)/$$i; \
279 $(INSTALL_DATA) $$i $(DESTDIR)$(DOC_DIR)/$$i; \
280 done
281 @for i in `cd openldap; find $(srcdir)/ -type f | grep -v .svn`; do \
282 echo $(INSTALL_DATA) $$i $(DESTDIR)$(DOC_DIR)/$$i; \
283 $(INSTALL_DATA) openldap/$$i $(DESTDIR)$(DOC_DIR)/$$i; \
284 done
285 $(INSTALL_DATA) README.txt $(DESTDIR)$(DOC_DIR)/README.txt
287 install-exec: all
288 @for i in bio bitbucket files images info userpics; do \
289 $(srcdir)/mkinstalldirs $(DESTDIR)$(prefix)/$$i; \
290 done
291 @for i in $(CLIENT_TARGETS) $(SERVER_TARGETS) $(UTIL_TARGETS) $(UTILBIN_TARGETS); do \
292 if test -f $$i; then \
293 echo $(INSTALL) $$i $(DESTDIR)$(prefix)/$$i; \
294 $(INSTALL) $$i $(DESTDIR)$(prefix)/$$i; \
295 fi \
296 done
297 $(srcdir)/mkinstalldirs $(DESTDIR)$(prefix)/unstripped
298 cp $(SERVER_TARGETS) $(DESTDIR)$(prefix)/unstripped/
300 @for i in utilsmenu database_cleanup.sh migrate_aliases.sh citadel-openldap.schema; do \
301 if test -f $(srcdir)/$$i; then \
302 echo $(INSTALL) $(srcdir)/$$i $(DESTDIR)$(prefix)/$$i; \
303 $(INSTALL) $(srcdir)/$$i $(DESTDIR)$(prefix)/$$i; \
304 fi \
305 done
307 install-exec-new: all
308 $(srcdir)/mkinstalldirs $(DESTDIR)/usr/sbin;
309 $(srcdir)/mkinstalldirs $(DESTDIR)/usr/bin;
310 $(srcdir)/mkinstalldirs $(DESTDIR)/usr/bin;
311 $(srcdir)/mkinstalldirs $(DESTDIR)$(UTILBIN_DIR);
312 $(srcdir)/mkinstalldirs $(DESTDIR)$(DOC_DIR);
313 @for i in $(SERVER_TARGETS) $(UTIL_TARGETS); do \
314 if test -f $$i; then \
315 echo $(INSTALL) $$i $(DESTDIR)/usr/sbin/$$i; \
316 $(INSTALL) $$i $(DESTDIR)/usr/sbin/$$i; \
317 fi \
318 done
319 cp citserver $(DESTDIR)/$(UTILBIN_DIR)/citserver.unstripped
320 cp migrate_aliases.sh $(DESTDIR)/$(UTILBIN_DIR)/
321 @for i in $(UTILBIN_TARGETS); do \
322 if test -f $$i; then \
323 echo $(INSTALL) $$i $(DESTDIR)/$(UTILBIN_DIR)/$$i; \
324 $(INSTALL) $$i $(DESTDIR)/$(UTILBIN_DIR)/$$i; \
325 fi \
326 done
328 $(INSTALL) citmail $(DESTDIR)/usr/sbin/sendmail;
329 @for i in $(CLIENT_TARGETS); do \
330 if test -f $$i; then \
331 echo $(INSTALL) $$i $(DESTDIR)/usr/bin/$$i; \
332 $(INSTALL) $$i $(DESTDIR)/usr/bin/$$i; \
333 fi \
334 done
335 @for i in utilsmenu database_cleanup.sh citadel-openldap.schema ; do \
336 if test -f $(srcdir)/$$i; then \
337 echo $(INSTALL) $(srcdir)/$$i $(DESTDIR)$(DOC_DIR)/$$i; \
338 $(INSTALL) $(srcdir)/$$i $(DESTDIR)$(DOC_DIR)/$$i; \
339 fi \
340 done
342 clean:
343 rm -f *.o
344 for i in $(srcdir)/modules/* ; do \
345 rm -f $$i/*.o ;\
346 done
347 rm -f $(CLIENT_TARGETS) $(SERVER_TARGETS) $(UTIL_TARGETS) $(UTILBIN_TARGETS) $(NOINST_TARGETS)
350 cleaner: clean
351 rm -rf $(CLIENT_TARGETS) $(SERVER_TARGETS) $(UTIL_TARGETS) $(UTILBIN_TARGETS) $(NOINST_TARGETS) database_cleanup.sh *.la
352 rm -rf modules_upgrade.c modules_init.c modules_init.h Make_modules Make_sources
354 distclean: cleaner
355 find . -name '*~' -o -name '.#*' | xargs rm -f
356 rm -f Makefile sysdep.h config.cache config.log config.status *.d
357 for i in $(srcdir)/modules/* ; do \
358 rm -f $$i/*.d ;\
359 done
361 .c.d:
362 @echo Checking dependencies for $<
363 @$(CC) $(DEPEND_FLAG) $(CPPFLAGS) $< | sed -e 's!$*.o!$*.o $*/.o $@!' > $@
364 @test -s $@ || rm -f $@
366 Makefile: $(srcdir)/Makefile.in config.status
367 CONFIG_FILES=Makefile CONFIG_HEADERS= $(SHELL) ./config.status
369 config.status: $(srcdir)/configure
370 $(SHELL) ./config.status --recheck
372 $(srcdir)/configure: $(srcdir)/configure.ac $(srcdir)/aclocal.m4
373 cd $(srcdir) && $(AUTOCONF)
375 $(srcdir)/aclocal.m4: $(srcdir)/acinclude.m4
376 cd $(srcdir) && $(ACLOCAL)
378 -include $(DEP_FILES)