1 # Makefile for Citadel/UX
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@uncnsrd.mt-kisco.ny.us and let me know what you
9 # did, so any necessary changes can be put into the next release.
11 ########################################################################
13 CLIENT_TARGETS=citadel whobbs
14 SERVER_TARGETS=citserver setup citadelapi.a
15 UTIL_TARGETS=aidepost netmailer netproc netsetup msgform \
16 readlog rcit stats sysoputil citmail netpoll mailinglist userlist
18 client: $(CLIENT_TARGETS)
20 server: $(SERVER_TARGETS)
22 utils: $(UTIL_TARGETS)
27 citadel: ipc_c_tcp.o citadel.o rooms.o routines.o routines2.o messages.o \
28 commands.o client_chat.o serv_info.o
29 $(CC) $(CFLAGS) ipc_c_tcp.o citadel.o rooms.o routines.o routines2.o \
30 messages.o commands.o client_chat.o serv_info.o $(LFLAGS) -o citadel
32 netpoll: netpoll.c config.o ipc_c_tcp.o
33 $(CC) $(CFLAGS) netpoll.c config.o ipc_c_tcp.o $(LFLAGS) -o netpoll
35 ipc_c_tcp.o: ipc_c_tcp.c sysdep.h
36 $(CC) $(CFLAGS) -c ipc_c_tcp.c
38 ipc_c_socks4.o: ipc_c_socks4.c sysdep.h
39 $(CC) $(CFLAGS) -c ipc_c_socks4.c
41 citadel.o: citadel.c axdefs.h citadel.h
42 $(CC) -O $(CFLAGS) -c citadel.c
44 rooms.o: rooms.c citadel.h
45 $(CC) -O $(CFLAGS) -c rooms.c
47 messages.o: messages.c citadel.h
48 $(CC) -O $(CFLAGS) -c messages.c
50 commands.o: commands.c citadel.h
51 $(CC) -O $(CFLAGS) -c commands.c
53 routines.o: routines.c citadel.h
54 $(CC) -O $(CFLAGS) -c routines.c
56 routines2.o: routines2.c citadel.h
57 $(CC) -O $(CFLAGS) -c routines2.c
59 client_chat.o: client_chat.c citadel.h
60 $(CC) -O $(CFLAGS) -c client_chat.c
62 serv_info.o: serv_info.c citadel.h
63 $(CC) -O $(CFLAGS) -c serv_info.c
69 citserver: citserver.o user_ops.o support.o room_ops.o file_ops.o \
70 msgbase.o config.o sysdep.o locate_host.o serv_chat.o \
71 hooks.o housekeeping.o database.o control.o logging.o
72 $(CC) $(CFLAGS) citserver.o user_ops.o room_ops.o file_ops.o support.o \
73 msgbase.o config.o sysdep.o locate_host.o serv_chat.o \
74 hooks.o housekeeping.o database.o control.o logging.o \
75 $(LFLAGS) $(SERVER_LFLAGS) -o citserver
77 citserver.o: citserver.c citadel.h
78 $(CC) $(CFLAGS) -D_REENTRANT -c citserver.c
80 user_ops.o: user_ops.c citadel.h
81 $(CC) $(CFLAGS) -D_REENTRANT -c user_ops.c
83 room_ops.o: room_ops.c citadel.h
84 $(CC) $(CFLAGS) -D_REENTRANT -c room_ops.c
86 file_ops.o: file_ops.c citadel.h
87 $(CC) $(CFLAGS) -D_REENTRANT -c file_ops.c
89 support.o: support.c citadel.h
90 $(CC) $(CFLAGS) -D_REENTRANT -c support.c
92 msgbase.o: msgbase.c citadel.h
93 $(CC) $(CFLAGS) -D_REENTRANT -c msgbase.c
95 locate_host.o: locate_host.c citadel.h
96 $(CC) $(CFLAGS) -D_REENTRANT -c locate_host.c
98 serv_chat.o: serv_chat.c citadel.h
99 $(CC) $(CFLAGS) -D_REENTRANT -c serv_chat.c
101 hooks.o: hooks.c citadel.h
102 $(CC) $(CFLAGS) -D_REENTRANT -c hooks.c
104 housekeeping.o: housekeeping.c citadel.h
105 $(CC) $(CFLAGS) -D_REENTRANT -c housekeeping.c
107 database.o: database.c citadel.h
108 $(CC) $(CFLAGS) -D_REENTRANT -c database.c
110 control.o: control.c citadel.h
111 $(CC) $(CFLAGS) -D_REENTRANT -c control.c
113 logging.o: logging.c citadel.h
114 $(CC) $(CFLAGS) -D_REENTRANT -c logging.c
116 config.o: config.c citadel.h axdefs.h
117 $(CC) -O $(CFLAGS) -D_REENTRANT -c config.c
119 sysdep.o: sysdep.c citadel.h
120 $(CC) -O $(CFLAGS) -D_REENTRANT -c sysdep.c
122 citadelapi.a: citadelapi.o ipc_c_tcp.o serv_info.o
123 $(AR) r citadelapi.a citadelapi.o ipc_c_tcp.o serv_info.o
124 $(RANLIB) citadelapi.a
126 citadelapi.o: citadelapi.c citadel.h
127 $(CC) -O $(CFLAGS) -D_REENTRANT -c citadelapi.c
129 aidepost: aidepost.c config.o citadel.h
130 $(CC) -O $(CFLAGS) aidepost.c config.o $(LFLAGS) -o aidepost
133 # 'netmailer' needs to run setuid because it generates headers for Internet
134 # mail. If it is not run setuid, all outgoing mail may always show as coming
135 # from your BBSUID rather than the actual sending user.
137 netmailer: netmailer.c internetmail.o config.o citadel.h
138 $(CC) -O $(CFLAGS) netmailer.c config.o internetmail.o $(LFLAGS) -o netmailer
141 internetmail.o: internetmail.c
142 $(CC) -O $(CFLAGS) -c internetmail.c
144 netproc: netproc.o config.o ipc_c_tcp.o citadel.h
145 $(CC) -O $(CFLAGS) netproc.o config.o ipc_c_tcp.o \
148 netproc.o: netproc.c citadel.h
149 $(CC) -O $(CFLAGS) -c netproc.c
151 citmail: citmail.c config.o internetmail.o citadel.h
153 # ###### IMPORTANT ######
154 # To allow Citadel users to receive Internet mail, you must
155 # set this program to be your local mail delivery agent.
157 $(CC) -O $(CFLAGS) citmail.c config.o internetmail.o $(LFLAGS) -o citmail
160 mailinglist: mailinglist.c config.o internetmail.o citadel.h
161 $(CC) -O $(CFLAGS) mailinglist.c config.o internetmail.o \
162 $(LFLAGS) -o mailinglist
164 setup: setup.c citadel.h
165 $(CC) -O $(CFLAGS) setup.c $(CURSES) $(LFLAGS) -o setup
167 netsetup: netsetup.c config.o citadel.h
168 $(CC) -O $(CFLAGS) netsetup.c config.o $(LFLAGS) -o netsetup
170 whobbs: whobbs.c ipc_c_tcp.o
171 $(CC) -O $(CFLAGS) whobbs.c ipc_c_tcp.o $(LFLAGS) -o whobbs
173 userlist: userlist.c ipc_c_tcp.o
174 $(CC) -O $(CFLAGS) userlist.c ipc_c_tcp.o $(LFLAGS) -o userlist
177 $(CC) -O $(CFLAGS) msgform.c $(LFLAGS) -o msgform
179 readlog: readlog.c config.o citadel.h
180 $(CC) -O $(CFLAGS) readlog.c config.o $(LFLAGS) -o readlog
182 rcit: rcit.c config.o citadel.h
183 $(CC) -O $(CFLAGS) rcit.c config.o $(LFLAGS) -o rcit
185 # NOTE: TO RECEIVE CITADEL TRAFFIC VIA THE RCIT PROGRAM (ESPECIALLY
186 # IF YOU ARE GATEWAYING TO USENET) YOU MUST LINK RNEWS TO RCIT:
187 #ln -s rcit /usr/bin/rnews
190 stats: stats.c config.o citadel.h
191 $(CC) -O $(CFLAGS) stats.c config.o $(LFLAGS) -o stats
193 sysoputil: sysoputil.c config.o citadel.h
194 $(CC) -O $(CFLAGS) sysoputil.c config.o $(LFLAGS) -o sysoputil
197 citadel.h: sysdep.h sysconfig.h ipcdef.h server.h
201 find . -name \*.[o] -print -exec rm -f {} \;
204 rm -f sysdep.h $(CLIENT_TARGETS) $(SERVER_TARGETS) $(UTIL_TARGETS)