Release version 977 generated by do-release.sh
[citadel.git] / citadel / Makefile
1 # Makefile for Citadel Server
2 # Copyright (c) 1987-2023 by Art Cancro and the citadel.org team
3 #
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.
6 #
7 # This program is open source software.  Use, duplication, and/or
8 # disclosure are subject to the GNU General Purpose License version 3.
9
10 # config.mk is generated by ./configure
11 include config.mk
12
13 all := citserver setup ctdlmigrate sendcommand citmail chkpw chkpwd #ctdl3264
14 all: $(all)
15
16 citserver: server/*.c server/modules/*/*.c config.mk server/*.h
17         cc ${CFLAGS} \
18                 server/*.c server/modules/*/*.c \
19                 ${LDFLAGS} -lresolv -lcitadel -lpthread -lz -lical -lldap -lcrypt -lexpat -lcurl -ldb \
20                 -o citserver
21
22 setup: utils/setup.c server/citadel_dirs.c utils/*.h server/*.h
23         cc ${CFLAGS} ${LDFLAGS} utils/setup.c -lcitadel -o setup
24
25 ctdlmigrate: utils/ctdlmigrate.c server/citadel_dirs.c utils/*.h server/*.h
26         cc ${CFLAGS} ${LDFLAGS} utils/ctdlmigrate.c -lcitadel -lreadline -o ctdlmigrate
27
28 sendcommand: utils/sendcommand.c server/citadel_dirs.c utils/*.h server/*.h
29         cc ${CFLAGS} ${LDFLAGS} utils/sendcommand.c -lcitadel -o sendcommand
30
31 citmail: utils/citmail.c server/citadel_dirs.c utils/*.h server/*.h
32         cc ${CFLAGS} ${LDFLAGS} utils/citmail.c -lcitadel -o citmail
33
34 chkpw: utils/chkpw.c utils/*.h server/*.h
35         cc ${CFLAGS} ${LDFLAGS} utils/chkpw.c -o chkpw
36
37 chkpwd: utils/chkpwd.c utils/auth.c utils/*.h server/*.h
38         cc ${CFLAGS} ${LDFLAGS} utils/chkpwd.c utils/auth.c -lcrypt -o chkpwd
39
40 ctdl3264: utils/ctdl3264.c utils/*.h server/*.h utils/ctdl3264_structs.h
41         cc ${CFLAGS} ${LDFLAGS} utils/ctdl3264.c -lcitadel -lz -ldb -o ctdl3264
42
43 utils/ctdl3264_structs.h: server/server.h utils/ctdl3264_prep.sh
44         utils/ctdl3264_prep.sh
45
46 config.mk: configure
47         ./configure
48
49 clean:
50         rm -vf $(all)
51         find . -name *.o | xargs rm -vf
52
53 distclean: clean
54         rm -vf config.mk
55
56 install: $(all) utils/*.sh
57         #
58         # Installing to ${CTDLDIR}
59         #
60         @for x in $(all) utils/*.sh ; do \
61                 install -v -C -D -t ${CTDLDIR} $$x ;\
62         done