1 # Makefile for Citadel Server
2 # Copyright (c) 1987-2022 by Art Cancro and the citadel.org team
4 # No, we are NOT using the obsolete GNU Autotools. This configure script works
5 # well on the Linux operating system (which uses the Linux kernel) and on BSD.
7 # This program is open source software. Use, duplication, and/or
8 # disclosure are subject to the GNU General Purpose License version 3.
11 # config.mk is generated by ./configure
14 all := citserver setup ctdlmigrate sendcommand citmail chkpw chkpwd
17 citserver: server/*.c server/modules/*/*.c config.mk server/*.h
19 server/*.c server/modules/*/*.c \
20 ${LDFLAGS} -lresolv -lcitadel -lpthread -lz -lical -lldap -lcrypt -lexpat -lcurl -ldb \
21 -Wno-deprecated-declarations \
24 setup: utils/setup.c server/citadel_dirs.c utils/*.h server/*.h
25 cc ${CFLAGS} ${LDFLAGS} utils/setup.c -lcitadel -o setup
27 ctdlmigrate: utils/ctdlmigrate.c server/citadel_dirs.c utils/*.h server/*.h
28 cc ${CFLAGS} ${LDFLAGS} utils/ctdlmigrate.c -lcitadel -lreadline -o ctdlmigrate
30 sendcommand: utils/sendcommand.c server/citadel_dirs.c utils/*.h server/*.h
31 cc ${CFLAGS} ${LDFLAGS} utils/sendcommand.c -lcitadel -o sendcommand
33 citmail: utils/citmail.c server/citadel_dirs.c utils/*.h server/*.h
34 cc ${CFLAGS} ${LDFLAGS} utils/citmail.c -lcitadel -o citmail
36 chkpw: utils/chkpw.c utils/*.h server/*.h
37 cc ${CFLAGS} ${LDFLAGS} utils/chkpw.c -o chkpw
39 chkpwd: utils/chkpwd.c utils/auth.c utils/*.h server/*.h
40 cc ${CFLAGS} ${LDFLAGS} utils/chkpwd.c utils/auth.c -lcrypt -o chkpwd
47 find . -name *.o | xargs rm -vf
52 install: $(all) utils/*.sh
54 # Installing to ${CTDLDIR}
56 @for x in $(all) utils/*.sh ; do \
57 install -v -C -D -t ${CTDLDIR} $$x ;\