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
)
34 SERV_MODULES
=crc16.o \
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
)
52 chkpwd_LIBS
=@chkpwd_LIBS@
54 CFLAGS
=@CFLAGS@
-I .
/include/
55 CPPFLAGS
=@CPPFLAGS@
-I.
-I .
/include/
62 INSTALL_DATA
=@INSTALL_DATA@
65 SERVER_LDFLAGS
=@SERVER_LDFLAGS@
66 SERVER_LIBS
=@SERVER_LIBS@
67 SETUP_LIBS
=@SETUP_LIBS@
70 # End configuration section
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 \
86 stress.c support.c sysdep.c user_ops.c userlist.c \
88 crc16.c journaling.c citadel_dirs.c threads.c
93 svn_revision.c
: ${SOURCES}
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
)
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
) \
139 citserver
$(EXEEXT
): $(SERV_OBJS
)
140 $(CC
) $(SERV_OBJS
) $(LDFLAGS
) $(SERVER_LDFLAGS
) $(LIBS
) $(SERVER_LIBS
) $(RESOLV
) -o citserver
$(EXEEXT
)
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
189 @echo Installation is complete.
190 @echo Now go to your Citadel directory and run
'setup'.
193 install-new
: install-exec-new install-data-new install-doc-new
195 @echo Installation is complete.
196 @echo Now go to your Citadel directory and run
'setup'.
199 upgrade
: install-exec install-doc
201 @echo Upgrade is complete.
202 @echo Now go to your Citadel directory and run
'setup'.
206 @for i in help messages network
/spoolin network
/spoolout \
207 network
/systems
; do \
208 $(srcdir)/mkinstalldirs
$(DESTDIR
)$(prefix)/$$i; \
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; \
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
; \
221 @for i in network
/spoolin network
/spoolout network
/systems
; do \
222 $(srcdir)/mkinstalldirs
$(DESTDIR
)$(RUN_DIR
)/$$i; \
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
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; \
236 $(srcdir)/mkinstalldirs
$(DESTDIR
)$(HELP_DIR
)/help
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; \
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; \
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; \
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; \
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; \
268 echo
$(INSTALL_DATA
) README.txt
$(DESTDIR
)$(prefix)/README.txt
269 $(INSTALL_DATA
) README.txt
$(DESTDIR
)$(prefix)/README.txt
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; \
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; \
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; \
286 $(INSTALL_DATA
) README.txt
$(DESTDIR
)$(DOC_DIR
)/README.txt
289 @for i in bio bitbucket files images
info userpics
; do \
290 $(srcdir)/mkinstalldirs
$(DESTDIR
)$(prefix)/$$i; \
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; \
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; \
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; \
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; \
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; \
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; \
345 for i in
$(srcdir)/modules
/* ; do \
348 rm -f
$(CLIENT_TARGETS
) $(SERVER_TARGETS
) $(UTIL_TARGETS
) $(UTILBIN_TARGETS
) $(NOINST_TARGETS
)
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
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 \
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
)