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