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.
13 ########################################################################
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@
31 CLIENT_TARGETS
=citadel
$(EXEEXT
) whobbs
$(EXEEXT
)
32 NOINST_TARGETS
=stress
$(EXEEXT
)
33 SERVER_TARGETS
=citserver
$(EXEEXT
)
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
)
51 chkpwd_LIBS
=@chkpwd_LIBS@
53 CFLAGS
=@CFLAGS@
-I .
/include/
54 CPPFLAGS
=@CPPFLAGS@
-I.
-I .
/include/
61 INSTALL_DATA
=@INSTALL_DATA@
64 SERVER_LDFLAGS
=@SERVER_LDFLAGS@
65 SERVER_LIBS
=@SERVER_LIBS@
66 SETUP_LIBS
=@SETUP_LIBS@
69 # End configuration section
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 \
85 stress.c support.c sysdep.c user_ops.c userlist.c \
87 journaling.c citadel_dirs.c threads.c
92 svn_revision.c
: ${SOURCES}
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
)
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
) \
138 citserver
$(EXEEXT
): $(SERV_OBJS
)
139 $(CC
) $(SERV_OBJS
) $(LDFLAGS
) $(SERVER_LDFLAGS
) $(LIBS
) $(SERVER_LIBS
) $(RESOLV
) -o citserver
$(EXEEXT
)
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
188 @echo Installation is complete.
189 @echo Now go to your Citadel directory and run
'setup'.
192 install-new
: install-exec-new install-data-new install-doc-new
194 @echo Installation is complete.
195 @echo Now go to your Citadel directory and run
'setup'.
198 upgrade
: install-exec install-doc
200 @echo Upgrade is complete.
201 @echo Now go to your Citadel directory and run
'setup'.
205 @for i in help messages network
/spoolin network
/spoolout \
206 network
/systems
; do \
207 $(srcdir)/mkinstalldirs
$(DESTDIR
)$(prefix)/$$i; \
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; \
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
; \
220 @for i in network
/spoolin network
/spoolout network
/systems
; do \
221 $(srcdir)/mkinstalldirs
$(DESTDIR
)$(RUN_DIR
)/$$i; \
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
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; \
235 $(srcdir)/mkinstalldirs
$(DESTDIR
)$(HELP_DIR
)/help
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; \
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; \
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; \
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; \
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; \
267 echo
$(INSTALL_DATA
) README.txt
$(DESTDIR
)$(prefix)/README.txt
268 $(INSTALL_DATA
) README.txt
$(DESTDIR
)$(prefix)/README.txt
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; \
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; \
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; \
285 $(INSTALL_DATA
) README.txt
$(DESTDIR
)$(DOC_DIR
)/README.txt
288 @for i in bio bitbucket files images
info userpics
; do \
289 $(srcdir)/mkinstalldirs
$(DESTDIR
)$(prefix)/$$i; \
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; \
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; \
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; \
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; \
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; \
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; \
344 for i in
$(srcdir)/modules
/* ; do \
347 rm -f
$(CLIENT_TARGETS
) $(SERVER_TARGETS
) $(UTIL_TARGETS
) $(UTILBIN_TARGETS
) $(NOINST_TARGETS
)
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
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 \
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
)