1 # Makefile for Citadel Server
2 # Copyright (c) 1987-2022 by Art Cancro and the citadel.org team
4 # This is the new and improved version that does not use the GNU Autotools,
5 # because it is The Current Year and we aren't trying to build for weird
6 # obscure systems anymore.
8 # This program is open source software. Use, duplication, and/or
9 # disclosure are subject to the GNU General Purpose License version 3.
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
17 # config.mk is generated by ./configure
20 all := citserver setup ctdlmigrate sendcommand citmail chkpw chkpwd
23 citserver: server/*.c server/modules/*/*.c config.mk server/*.h
25 server/*.c server/modules/*/*.c \
26 ${LDFLAGS} -lresolv -lcitadel -lpthread -lz -lical -lldap -lcrypt -lexpat -lcurl -ldb \
29 setup: utils/setup.c server/citadel_dirs.c utils/*.h server/*.h
30 cc ${CFLAGS} utils/setup.c -lcitadel -o setup
32 ctdlmigrate: utils/ctdlmigrate.c server/citadel_dirs.c utils/*.h server/*.h
33 cc ${CFLAGS} utils/ctdlmigrate.c -lcitadel -lreadline -o ctdlmigrate
35 sendcommand: utils/sendcommand.c server/citadel_dirs.c utils/*.h server/*.h
36 cc ${CFLAGS} utils/sendcommand.c -lcitadel -o sendcommand
38 citmail: utils/citmail.c server/citadel_dirs.c utils/*.h server/*.h
39 cc ${CFLAGS} utils/citmail.c -lcitadel -o citmail
41 chkpw: utils/chkpw.c utils/*.h server/*.h
42 cc ${CFLAGS} utils/chkpw.c -o chkpw
44 chkpwd: utils/chkpwd.c utils/auth.c utils/*.h server/*.h
45 cc ${CFLAGS} utils/chkpwd.c utils/auth.c -lcrypt -o chkpwd
52 find . -name *.o | xargs rm -vf
57 install: $(all) utils/*.sh
59 # Installing to ${CTDLDIR}
61 @for x in $(all) utils/*.sh ; do \
62 install -v -C -D -t ${CTDLDIR} $$x ;\