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 ########################################################################
19 CLIENT_TARGETS=citadel whobbs
20 SERVER_TARGETS=citserver setup
21 SERV_MODULES=modules/serv_chat.so modules/serv_test.so
22 UTIL_TARGETS=aidepost netmailer netproc netsetup msgform \
23 readlog rcit stats citmail netpoll mailinglist userlist
27 CPPFLAGS=@CPPFLAGS@ -I.
32 SERVER_LDFLAGS=@SERVER_LDFLAGS@
37 PTHREAD_DEFS=-D_REENTRANT
39 SOURCES=aidepost.c citadel.c citmail.c citserver.c client_chat.c commands.c \
40 config.c control.c cux2ascii.c database.c dynloader.c file_ops.c \
41 housekeeping.c import.c internetmail.c ipc_c_tcp.c locate_host.c \
42 logging.c mailinglist.c messages.c msgbase.c msgform.c netmailer.c \
43 netpoll.c netproc.c netsetup.c policy.c proxy.c rcit.c readlog.c \
44 room_ops.c rooms.c roomutil.c routines.c routines2.c serv_chat.c \
45 serv_info.c serv_test.c serv_upgrade.c setup.c snprintf.c stats.c \
46 support.c sysdep.c tools.c user_ops.c useradmin.c userlist.c \
49 DEP_FILES=$(SOURCES:.c=.d)
51 client: $(CLIENT_TARGETS)
53 server: $(SERVER_TARGETS)
55 utils: $(UTIL_TARGETS)
57 serv_modules: $(SERV_MODULES)
62 citadel: ipc_c_tcp.o citadel.o rooms.o routines.o routines2.o messages.o \
63 commands.o client_chat.o serv_info.o tools.o $(SNPRINTF)
64 $(CC) ipc_c_tcp.o citadel.o rooms.o routines.o routines2.o messages.o \
65 commands.o client_chat.o serv_info.o tools.o $(SNPRINTF) $(LDFLAGS) \
68 netpoll: netpoll.o config.o ipc_c_tcp.o
69 $(CC) netpoll.o config.o ipc_c_tcp.o $(LDFLAGS) -o netpoll
72 $(CC) $(CFLAGS) $(CPPFLAGS) $(DEFS) -c $<
77 citserver: citserver.ro user_ops.ro support.ro room_ops.ro file_ops.ro \
78 msgbase.ro config.ro sysdep.ro locate_host.ro \
79 housekeeping.ro database.ro control.ro logging.ro \
80 policy.ro dynloader.ro $(SNPRINTF:.o=.ro)
82 citserver.ro user_ops.ro room_ops.ro file_ops.ro support.ro \
83 msgbase.ro config.ro sysdep.ro locate_host.ro \
84 housekeeping.ro database.ro control.ro logging.ro \
85 policy.ro dynloader.ro $(SNPRINTF:.o=.ro)\
86 $(LDFLAGS) $(SERVER_LDFLAGS) $(LIBS) -o citserver
89 $(CC) $(CFLAGS) $(CPPFLAGS) $(DEFS) $(PTHREAD_DEFS) -c $< -o $@
91 modules/serv_chat.so: serv_chat.mo
92 $(CC) -shared -o modules/serv_chat.so serv_chat.mo
95 $(CC) $(CFLAGS) $(CPPFLAGS) $(DEFS) $(PTHREAD_DEFS) -fPIC -DPIC -c $< \
98 modules/serv_test.so: serv_test.mo
99 $(CC) -shared -o modules/serv_test.so serv_test.mo
101 aidepost: aidepost.o config.o
102 $(CC) aidepost.o config.o $(LDFLAGS) -o aidepost
105 # 'netmailer' needs to run setuid because it generates headers for Internet
106 # mail. If it is not run setuid, all outgoing mail may always show as coming
107 # from your BBSUID rather than the actual sending user.
109 netmailer: netmailer.o internetmail.o config.o
110 $(CC) netmailer.o config.o internetmail.o $(LDFLAGS) -o netmailer
113 netproc: netproc.o config.o ipc_c_tcp.o
114 $(CC) netproc.o config.o ipc_c_tcp.o $(LDFLAGS) -o netproc
116 citmail: citmail.o config.o internetmail.o
118 @echo "* ###### IMPORTANT ######"
119 @echo "* To allow Citadel users to receive Internet mail, you must"
120 @echo "* set this program to be your local mail delivery agent."
122 $(CC) citmail.o config.o internetmail.o $(LDFLAGS) -o citmail
125 mailinglist: mailinglist.o config.o internetmail.o
126 $(CC) mailinglist.o config.o internetmail.o $(LDFLAGS) -o mailinglist
129 $(CC) setup.o $(CURSES) $(LDFLAGS) -o setup
131 netsetup: netsetup.o config.o
132 $(CC) netsetup.o config.o $(LDFLAGS) -o netsetup
134 proxy: proxy.o ipc_c_tcp.o
135 $(CC) proxy.o ipc_c_tcp.o $(LDFLAGS) -o proxy
137 whobbs: whobbs.o ipc_c_tcp.o
138 $(CC) whobbs.o ipc_c_tcp.o $(LDFLAGS) -o whobbs
140 userlist: userlist.o ipc_c_tcp.o
141 $(CC) userlist.o ipc_c_tcp.o $(LDFLAGS) -o userlist
144 $(CC) msgform.o $(LDFLAGS) -o msgform
146 readlog: readlog.o config.o
147 $(CC) readlog.o config.o $(LDFLAGS) -o readlog
149 rcit: rcit.o config.o
150 $(CC) rcit.o config.o $(LDFLAGS) -o rcit
152 @echo "* NOTE: TO RECEIVE CITADEL TRAFFIC VIA THE RCIT PROGRAM (ESPECIALLY"
153 @echo "* IF YOU ARE GATEWAYING TO USENET) YOU MUST LINK RNEWS TO RCIT:"
154 @echo "* ln -s rcit /usr/bin/rnews"
157 stats: stats.o config.o
158 $(CC) stats.o config.o $(LDFLAGS) -o stats
164 rm -f $(CLIENT_TARGETS) $(SERVER_TARGETS) $(UTIL_TARGETS) \
165 $(SERV_MODULES) $(PROXY_TARGETS) so_locations
168 rm -f Makefile sysdep.h config.cache config.log config.status *.d
171 $(CC) -M $(CPPFLAGS) $< | sed -e 's!$*.o!$*.o $*.ro $*.mo $@!' > $@
172 test -s $@ || rm -f $@
174 Makefile: Makefile.in
175 CONFIG_FILES=Makefile CONFIG_HEADERS= ./config.status
177 -include $(DEP_FILES)