GNUmakefile 12.1 KB
Newer Older
1
# GNUmakefile
2
3

#########################################################################
4
# Makefile for Synchronet BBS for Unix									#
5
# For use with GNU make and GNU C Compiler or Borland Kylix C++			#
6
7
# @format.tab-size 4, @format.use-tabs true								#
#																		#
8
9
# gcc: gmake															#
# Borland (still in testing/debuging stage): gmake bcc=1				#
10
11
12
13
14
15
16
#																		#
# Optional build targets: dlls, utils, mono, all (default)				#
#########################################################################

# $Id$

# Macros
17
18
19
20
21
22
ifndef DEBUG
 ifndef RELEASE
  DEBUG	:=	1
 endif
endif

23
24
25
26
ifndef VERBOSE
 QUIET	=	@
endif

deuce's avatar
deuce committed
27
#USE_DIALOG =   1       # Dialog vesrion of UIFC
28
#USE_FLTK =     1       # Use Windowed version
deuce's avatar
deuce committed
29
30
USE_CURSES      =       1       # Curses version of UIFC

31
ifdef DEBUG
32
 BUILD	=	debug
33
else
34
 BUILD	=	release
35
36
endif

37
ifdef bcc
38
39
40
41
 CC		=	bc++ -q
 CCPRE	:=	bcc
 CCPP	=	bc++ -q
 LD		=	ilink -q
42
 CFLAGS +=	-mm -md -D__unix__ -w-csu -w-pch -w-ccc -w-rch -w-par -w-aus
43
else
44
 CFLAGS	+=	-MMD -Wall
deuce's avatar
deuce committed
45
 CCPRE	:=	gcc
46
47
48
49
50
51
52
 ifdef BUILD_DEPENDS
  CC		=	../build/mkdep -a
  CCPP	=	../build/mkdep -a
  LD		=	echo
  COMPILE_MSG	:= Depending
 else
  CC		=	gcc
deuce's avatar
deuce committed
53
  CCPP	=	g++
54
55
56
  LD		=	ld
  COMPILE_MSG	:= Compiling
 endif
57
endif
58
59
60
SLASH	=	/
OFILE	=	o

61
LIBFILE	=	.so
rswindell's avatar
rswindell committed
62
UIFC	=	../uifc/
63
XPDEV	=	../xpdev/
64
LIBPREFIX =	lib
65

66
67
ifndef os
 os		:=	$(shell uname)
68
endif
69
70
71
ifeq ($(shell uname -m),ppc)
 os		:=	$(os)-ppc
endif
72
# this line wont work with solaris unless awk in path is actually gawk 
73
os      :=	$(shell echo $(os) | tr "[ A-Z]" "[\-a-z]")
74
75
# remove '/' from "os/2"
os      :=  $(shell echo $(os) | tr -d "/")
76

77
78
ifeq ($(os),freebsd)
 BSD	=	1
79
else
80
81
82
 ifeq ($(os),openbsd)
  BSD	=	1
 endif
83
endif
84

85
86
LIBODIR :=	$(CCPRE).$(os).lib.$(BUILD)
EXEODIR :=	$(CCPRE).$(os).exe.$(BUILD)
87

88
DELETE	=	rm -f
89

90
CFLAGS	+=	-DJAVASCRIPT -I../../include/mozilla/js -I$(XPDEV) -I$(UIFC)
91

92
93
ifdef BSD	# BSD
 # Math libraries needed and uses pthread
94
95
 LFLAGS	:=	-lm -lutil -lc_r
 CFLAGS +=	-pthread 
96
else			# Linux / Other UNIX
97
98
 # Math and pthread libraries needed
 ifdef bcc
99
  LFLAGS	:=	libpthread.so -lc
100
 else
101
  LFLAGS	:=	-lm -lpthread -lutil -lc
102
 endif
103
endif
104

105
106
ifeq ($(os),linux)    # Linux
 CFLAGS	+= -D_THREAD_SUID_BROKEN
107
108
endif

109
ifeq ($(os),sunos)    # Solaris
110
111
 CFLAGS	:= -D_REENTRANT -D__solaris__ -DNEEDS_DAEMON -D_POSIX_PTHREAD_SEMANTICS -DNEEDS_FORKPTY
 LFLAGS := -lm -lpthread -lsocket -lnsl -lrt
112
113
endif

114
ifeq ($(os),netbsd)
115
 CFLAGS += -D_REENTRANT -D__unix__ -I/usr/pkg/include -DNEEDS_FORKPTY
116
 LFLAGS := -lm -lpthread -L/usr/pkg/lib -L/usr/pkg/pthreads/lib
117
118
endif

119
# So far, only QNX has sem_timedwait()
120
121
ifeq ($(os),qnx)
 LFLAGS := -lm -lsocket
122
123
124
else
 CFLAGS	+=	-DUSE_XP_SEMAPHORES
 USE_XP_SEMAPHORES	:=	1
125
126
endif

127
ifdef DEBUG
128
129
130
131
132
133
 ifdef bcc
  CFLAGS	+=	-y -v -Od
 else
  CFLAGS	+=	-ggdb
 endif
 CFLAGS  +=	-D_DEBUG
134
135
else
 CFLAGS	+= -O3
136
endif
137

deuce's avatar
deuce committed
138
JSLIB	:=	-L../../lib/mozilla/js/$(os).$(BUILD) -ljs
139

140
# The following are needed for echocfg (uses UIFC)
141
UIFC_OBJS =	$(LIBODIR)/uifcx.o
142
ifdef USE_FLTK
143
144
 CFLAGS +=	-DUSE_FLTK -I../../include/fltk
 UIFC_LFLAGS += -L../../lib/fltk/$(os) -L/usr/X11R6/lib -lm -lfltk -lX11
145
 UIFC_OBJS+=	$(LIBODIR)/uifcfltk.o
146
endif
deuce's avatar
deuce committed
147
ifdef USE_CURSES
148
 CFLAGS +=	-DUSE_CURSES
149
150
151
152
153
 ifeq ($(os),qnx)
  UIFC_LFLAGS += -lncurses
 else
  UIFC_LFLAGS += -lcurses
 endif
154
 UIFC_OBJS +=	$(LIBODIR)/uifcc.o
deuce's avatar
deuce committed
155
endif
156

157
158
159
160
161
#The following is needed for nspr support on Linux
ifeq ($(os),linux)
 LFLAGS	+=	-ldl
endif

rswindell's avatar
rswindell committed
162
163
164
include targets.mk		# defines all targets
include objects.mk		# defines $(OBJS)
include sbbsdefs.mk		# defines $(SBBSDEFS)
165

166
167
ifeq ($(USE_XP_SEMAPHORES),1)
 OBJS	+=	$(LIBODIR)$(SLASH)xpsem.$(OFILE)
168
169
endif

170
171
172
173
174
#SBBSLIB	=	$(LIBODIR)$(SLASH)libsbbs.so
SBBSLIB	=	-lsbbs

#dummy rule
$(SBBSLIB) : $(SBBS)
175

rswindell's avatar
rswindell committed
176
vpath %.c $(XPDEV) $(UIFC)
177
vpath %.cpp $(UIFC)
rswindell's avatar
rswindell committed
178

179
LFLAGS		+=	-L./$(LIBODIR)
180
SBBSLDFLAGS	:=	$(LFLAGS) -rpath-link ./$(LIBODIR) -rpath ./ 
181
182
183
#LFLAGS		+=	-Wl,-rpath-link,./$(LIBODIR),-rpath,./
LFLAGS		+=	-Xlinker -rpath
LFLAGS		+=	-Xlinker .
deuce's avatar
deuce committed
184
185
186
ifneq ($(os),openbsd)
LFLAGS		+=	-Xlinker -rpath-link
LFLAGS		+=	-Xlinker ./$(LIBODIR)
deuce's avatar
deuce committed
187
188
189
190
LFLAGS		+=	-Xlinker -rpath-link
LFLAGS		+=	-Xlinker ../../lib/mozilla/js/$(os).$(BUILD)
LFLAGS		+=	-Xlinker -rpath-link
LFLAGS		+=	-Xlinker ../../lib/mozilla/nspr/$(os).$(BUILD)
deuce's avatar
deuce committed
191
endif
192
193
194
195
196
197
ifeq ($(os),freebsd)
LFLAGS		+=	-pthread
endif
ifeq ($(os),openbsd)
LFLAGS		+=	-pthread
endif
198

199
# Implicit C Compile Rule for SBBS
deuce's avatar
deuce committed
200
$(LIBODIR)/%.o : %.c $(BUILD_DEPENDS)
201
   ifndef bcc
202
	@echo $(COMPILE_MSG) $<
203
   endif
204
	$(QUIET)$(CC) $(CFLAGS) $(SBBSDEFS) -o $@ -c $<
205
206

# Implicit C++ Compile Rule for SBBS
deuce's avatar
deuce committed
207
$(LIBODIR)/%.o : %.cpp $(BUILD_DEPENDS)
208
   ifndef bcc
209
	@echo $(COMPILE_MSG) $<
210
   endif
211
	$(QUIET)$(CCPP) $(CFLAGS) $(SBBSDEFS) -o $@ -c $<
212
213
214
215
216
217
218

$(LIBODIR):
	mkdir $(LIBODIR)

$(EXEODIR):
	mkdir $(EXEODIR)

219
220
CON_OBJS	= $(LIBODIR)/sbbscon.o $(LIBODIR)/conwrap.o \
		  $(LIBODIR)/sbbs_ini.o
221
CON_LDFLAGS	= -lftpsrvr -lwebsrvr -lmailsrvr -lservices
222
FTP_OBJS	= $(LIBODIR)/ftpsrvr.o
223
MAIL_OBJS	= $(LIBODIR)/mailsrvr.o $(LIBODIR)/mxlookup.o \
deuce's avatar
deuce committed
224
 		  $(LIBODIR)/mime.o $(LIBODIR)/base64.o
deuce's avatar
deuce committed
225
WEB_OBJS	= $(LIBODIR)/websrvr.o $(LIBODIR)/sockwrap.o $(LIBODIR)/base64.o
226
SERVICE_OBJS	= $(LIBODIR)/services.o
227

rswindell's avatar
rswindell committed
228
229
MONO_OBJS	= $(CON_OBJS) $(FTP_OBJS) $(WEB_OBJS) \
			$(MAIL_OBJS) $(SERVICE_OBJS)
230
SMBLIB_OBJS = \
231
232
233
	$(LIBODIR)/smblib.o \
	$(LIBODIR)/filewrap.o \
	$(LIBODIR)/crc16.o
234

235
236

# Monolithic Synchronet executable Build Rule
237
FORCE$(SBBSMONO): $(MONO_OBJS) $(OBJS) $(LIBS)
deuce's avatar
deuce committed
238
239

$(SBBSMONO): $(MONO_OBJS) $(OBJS) $(LIBS)
240
	@echo Linking $@
241
	$(QUIET)$(CCPP) -o $@ $(LFLAGS) $(JSLIB) $^
242
243

# Synchronet BBS library Link Rule
244
FORCE$(SBBS): $(OBJS) $(LIBS)
deuce's avatar
deuce committed
245

246
$(SBBS): $(OBJS) $(LIBS)
247
	@echo Linking $@
deuce's avatar
deuce committed
248
	$(QUIET)$(CCPP) $(LFLAGS) -o $(SBBS) $(JSLIB) $^ -shared -o $@
249
250

# FTP Server Link Rule
251
FORCE$(FTPSRVR): $(LIBODIR)/ftpsrvr.o $(SBBSLIB)
deuce's avatar
deuce committed
252
253

$(FTPSRVR): $(LIBODIR)/ftpsrvr.o $(SBBSLIB)
254
	@echo Linking $@
deuce's avatar
deuce committed
255
	$(QUIET)$(CC) $(LFLAGS) $^ $(JSLIB) -shared -o $@ 
256
257

# Mail Server Link Rule
258
FORCE$(MAILSRVR): $(MAIL_OBJS) $(LIBODIR)$(SLASH)$(SBBSLIB)
deuce's avatar
deuce committed
259
260

$(MAILSRVR): $(MAIL_OBJS) $(SBBSLIB)
261
	@echo Linking $@
deuce's avatar
deuce committed
262
	$(QUIET)$(CC) $(LFLAGS) $^ $(JSLIB) -shared -o $@
263
264
265
266
267
268

# Mail Server Link Rule
FORCE$(WEBSRVR): $(WEB_OBJS) $(SBBSLIB)

$(WEBSRVR): $(WEB_OBJS) $(SBBSLIB)
	@echo Linking $@
deuce's avatar
deuce committed
269
	$(QUIET)$(CC) $(LFLAGS) $^ $(JSLIB) -shared -o $@
270
271
272
273
274
275

# Services Link Rule
FORCE$(SERVICES): $(WEB_OBJS) $(SBBSLIB)

$(SERVICES): $(SERVICE_OBJS) $(SBBSLIB)
	@echo Linking $@
deuce's avatar
deuce committed
276
	$(QUIET)$(CC) $(LFLAGS) $^ $(JSLIB) -shared -o $@
277
278

# Synchronet Console Build Rule
279
FORCE$(SBBSCON): $(CON_OBJS) $(SBBSLIB) $(FTP_OBJS) $(MAIL_OBJS) $(WEB_OBJS) $(SERVICE_OBJS)
deuce's avatar
deuce committed
280

281
282
$(SBBSCON): $(CON_OBJS) $(SBBSLIB) $(FTPSRVR) $(WEBSRVR) $(MAILSRVR) $(SERVICES)
	@echo Linking $@
283
	$(QUIET)$(CC) $(CFLAGS) $(LFLAGS) $(CON_LDFLAGS) -o $@ $(CON_OBJS) $(SBBSLIB)
284
285

# Specifc Compile Rules
deuce's avatar
deuce committed
286
$(LIBODIR)/ftpsrvr.o: ftpsrvr.c ftpsrvr.h $(BUILD_DEPENDS)
287
	@echo $(COMPILE_MSG) $<
288
	$(QUIET)$(CC) $(CFLAGS) -DFTPSRVR_EXPORTS -o $@ -c $<
289

deuce's avatar
deuce committed
290
$(LIBODIR)/mailsrvr.o: mailsrvr.c mailsrvr.h $(BUILD_DEPENDS)
291
	@echo $(COMPILE_MSG) $<
292
	$(QUIET)$(CC) $(CFLAGS) -DMAILSRVR_EXPORTS -o $@ -c $<
293

deuce's avatar
deuce committed
294
$(LIBODIR)/mxlookup.o: mxlookup.c $(BUILD_DEPENDS)
295
	@echo $(COMPILE_MSG) $<
296
	$(QUIET)$(CC) $(CFLAGS) -DMAILSRVR_EXPORTS -o $@ -c $<
297

deuce's avatar
deuce committed
298
$(LIBODIR)/mime.o: mime.c $(BUILD_DEPENDS)
299
	@echo $(COMPILE_MSG) $<
300
	$(QUIET)$(CC) $(CFLAGS) -DMAILSRVR_EXPORTS -o $@ -c $<		
301

deuce's avatar
deuce committed
302
$(LIBODIR)/websrvr.o: websrvr.c websrvr.h $(BUILD_DEPENDS)
303
	@echo $(COMPILE_MSG) $<
304
	$(QUIET)$(CC) $(CFLAGS) -DWEBSRVR_EXPORTS -o $@ -c $<
deuce's avatar
deuce committed
305

deuce's avatar
deuce committed
306
$(LIBODIR)/base64.o: base64.c base64.h $(BUILD_DEPENDS)
307
	@echo $(COMPILE_MSG) $<
308
	$(QUIET)$(CC) $(CFLAGS) -DWEBSRVR_EXPORTS -o $@ -c $<
rswindell's avatar
rswindell committed
309

deuce's avatar
deuce committed
310
$(LIBODIR)/services.o: services.c services.h $(BUILD_DEPENDS)
311
	@echo $(COMPILE_MSG) $<
312
	$(QUIET)$(CC) $(CFLAGS) -DSERVICES_EXPORTS -o $@ -c $<
313
314

# Baja Utility
315
BAJA_OBJS = \
316
317
318
319
320
	$(LIBODIR)/baja.o \
	$(LIBODIR)/ars.o \
	$(LIBODIR)/crc32.o \
	$(LIBODIR)/genwrap.o \
	$(LIBODIR)/filewrap.o
321
FORCE$(BAJA): $(BAJA_OBJS)
deuce's avatar
deuce committed
322

323
$(BAJA): $(BAJA_OBJS)
324
	@echo Linking $@
325
	$(QUIET)$(CC) -o $@ $^
326
327

# Node Utility
328
NODE_OBJS = \
329
330
331
	$(LIBODIR)/node.o \
	$(LIBODIR)/genwrap.o \
	$(LIBODIR)/filewrap.o
332
FORCE$(NODE): $(NODE_OBJS)
deuce's avatar
deuce committed
333

334
$(NODE): $(NODE_OBJS)
335
	@echo Linking $@
336
	$(QUIET)$(CC) -o $@ $^ 
337
338

# FIXSMB Utility
339
FIXSMB_OBJS = \
340
	$(LIBODIR)/fixsmb.o \
341
	$(SMBLIB_OBJS) \
342
343
	$(LIBODIR)/genwrap.o \
	$(LIBODIR)/str_util.o
344
345
346
FORCE$(FIXSMB): $(FIXSMB_OBJS)
	
$(FIXSMB): $(FIXSMB_OBJS)
347
	@echo Linking $@
348
	$(QUIET)$(CC) -o $@ $^
349
350

# CHKSMB Utility
351
CHKSMB_OBJS = \
352
	$(LIBODIR)/chksmb.o \
353
	$(SMBLIB_OBJS) \
354
355
356
	$(LIBODIR)/conwrap.o \
	$(LIBODIR)/dirwrap.o \
	$(LIBODIR)/genwrap.o
357
FORCE$(CHKSMB): $(CHKSMB_OBJS)
deuce's avatar
deuce committed
358

359
$(CHKSMB): $(CHKSMB_OBJS)
360
	@echo Linking $@
361
	$(QUIET)$(CC) -o $@ $^
362
363

# SMB Utility
364
SMBUTIL_OBJS = \
365
	$(LIBODIR)/smbutil.o \
366
	$(SMBLIB_OBJS) \
367
368
369
370
371
372
373
374
	$(LIBODIR)/conwrap.o \
	$(LIBODIR)/dirwrap.o \
	$(LIBODIR)/genwrap.o \
	$(LIBODIR)/smbtxt.o \
	$(LIBODIR)/crc32.o \
	$(LIBODIR)/lzh.o \
	$(LIBODIR)/date_str.o \
	$(LIBODIR)/str_util.o
375
376
377
378
FORCE$(SMBUTIL): $(SMBUTIL_OBJS)
	
$(SMBUTIL): $(SMBUTIL_OBJS)
	@echo Linking $@
379
	$(QUIET)$(CC) -o $@ $^
deuce's avatar
deuce committed
380

381
382
# SBBSecho (FidoNet Packet Tosser)
SBBSECHO_OBJS = \
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
	$(LIBODIR)/sbbsecho.o \
	$(LIBODIR)/ars.o \
	$(LIBODIR)/crc32.o \
	$(LIBODIR)/date_str.o \
	$(LIBODIR)/load_cfg.o \
	$(LIBODIR)/scfglib1.o \
	$(LIBODIR)/scfglib2.o \
	$(LIBODIR)/nopen.o \
	$(LIBODIR)/str_util.o \
	$(LIBODIR)/dat_rec.o \
	$(LIBODIR)/userdat.o \
	$(LIBODIR)/rechocfg.o \
	$(LIBODIR)/conwrap.o \
	$(LIBODIR)/dirwrap.o \
	$(LIBODIR)/genwrap.o \
398
	$(SMBLIB_OBJS) \
399
400
	$(LIBODIR)/smbtxt.o \
	$(LIBODIR)/lzh.o
401
402
403
404

FORCE$(SBBSECHO): $(SBBSECHO_OBJS)

$(SBBSECHO): $(SBBSECHO_OBJS)
rswindell's avatar
rswindell committed
405
	@echo Linking $@
406
	$(QUIET)$(CC) -o $@ $^
rswindell's avatar
rswindell committed
407

rswindell's avatar
rswindell committed
408
# SBBSecho Configuration Program
rswindell's avatar
rswindell committed
409
ECHOCFG_OBJS = \
410
411
	$(LIBODIR)/echocfg.o \
	$(LIBODIR)/rechocfg.o \
deuce's avatar
deuce committed
412
	$(UIFC_OBJS) \
413
414
415
416
417
418
	$(LIBODIR)/nopen.o \
	$(LIBODIR)/crc16.o \
	$(LIBODIR)/str_util.o \
	$(LIBODIR)/filewrap.o \
	$(LIBODIR)/genwrap.o \
	$(LIBODIR)/dirwrap.o
deuce's avatar
deuce committed
419

420
421
422
FORCE$(ECHOCFG): $(ECHOCFG_OBJS)

$(ECHOCFG): $(ECHOCFG_OBJS)
rswindell's avatar
rswindell committed
423
	@echo Linking $@
424
	$(QUIET)$(CC) -o $@ $^ $(UIFC_LFLAGS)
rswindell's avatar
rswindell committed
425

rswindell's avatar
rswindell committed
426
# ADDFILES
427
ADDFILES_OBJS = \
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
	$(LIBODIR)/addfiles.o \
	$(LIBODIR)/ars.o \
	$(LIBODIR)/date_str.o \
	$(LIBODIR)/load_cfg.o \
	$(LIBODIR)/scfglib1.o \
	$(LIBODIR)/scfglib2.o \
	$(LIBODIR)/nopen.o \
	$(LIBODIR)/crc16.o \
	$(LIBODIR)/str_util.o \
	$(LIBODIR)/dat_rec.o \
	$(LIBODIR)/userdat.o \
	$(LIBODIR)/filedat.o \
	$(LIBODIR)/filewrap.o \
	$(LIBODIR)/dirwrap.o \
	$(LIBODIR)/genwrap.o
deuce's avatar
deuce committed
443

444
445
446
FORCE$(ADDFILES): $(ADDFILES_OBJS)

$(ADDFILES): $(ADDFILES_OBJS)
rswindell's avatar
rswindell committed
447
	@echo Linking $@
448
	$(QUIET)$(CC) -o $@ $^
rswindell's avatar
rswindell committed
449

450
# FILELIST
451
FILELIST_OBJS = \
452
453
454
455
456
457
458
459
460
461
462
463
464
465
	$(LIBODIR)/filelist.o \
	$(LIBODIR)/ars.o \
	$(LIBODIR)/date_str.o \
	$(LIBODIR)/load_cfg.o \
	$(LIBODIR)/scfglib1.o \
	$(LIBODIR)/scfglib2.o \
	$(LIBODIR)/nopen.o \
	$(LIBODIR)/crc16.o \
	$(LIBODIR)/str_util.o \
	$(LIBODIR)/dat_rec.o \
	$(LIBODIR)/filedat.o \
	$(LIBODIR)/filewrap.o \
	$(LIBODIR)/dirwrap.o \
	$(LIBODIR)/genwrap.o
deuce's avatar
deuce committed
466

467
468
469
FORCE$(FILELIST): $(FILELIST_OBJS)

$(FILELIST): $(FILELIST_OBJS)
470
	@echo Linking $@
471
	$(QUIET)$(CC) -o $@ $^
472

473
# MAKEUSER
474
MAKEUSER_OBJS = \
475
476
477
478
479
480
481
482
483
484
485
486
487
488
	$(LIBODIR)/makeuser.o \
	$(LIBODIR)/ars.o \
	$(LIBODIR)/date_str.o \
	$(LIBODIR)/load_cfg.o \
	$(LIBODIR)/scfglib1.o \
	$(LIBODIR)/scfglib2.o \
	$(LIBODIR)/nopen.o \
	$(LIBODIR)/crc16.o \
	$(LIBODIR)/str_util.o \
	$(LIBODIR)/dat_rec.o \
	$(LIBODIR)/userdat.o \
	$(LIBODIR)/filewrap.o \
	$(LIBODIR)/dirwrap.o \
	$(LIBODIR)/genwrap.o
deuce's avatar
deuce committed
489

490
491
492
FORCE$(MAKEUSER): $(MAKEUSER_OBJS)

$(MAKEUSER): $(MAKEUSER_OBJS)
493
	@echo Linking $@
494
	$(QUIET)$(CC) -o $@ $^
deuce's avatar
deuce committed
495

rswindell's avatar
rswindell committed
496
497
# JSEXEC
JSEXEC_OBJS = \
498
	$(LIBODIR)/jsexec.o \
499
	$(SBBSLIB)
rswindell's avatar
rswindell committed
500
501
502

FORCE$(JSEXEC): $(JSEXEC_OBJS)

503
$(JSEXEC): $(JSEXEC_OBJS)
rswindell's avatar
rswindell committed
504
	@echo Linking $@
505
	$(QUIET)$(CCPP) -o $@ $(LFLAGS) $^
rswindell's avatar
rswindell committed
506
507
	
# ANS2MSG
508
509
$(ANS2MSG): $(LIBODIR)/ans2msg.o
	@echo Linking $@
510
	$(QUIET)$(CC) -o $@ $^
deuce's avatar
deuce committed
511

512
513
514
# MSG2ANS
$(MSG2ANS): $(LIBODIR)/msg2ans.o
	@echo Linking $@
515
	$(QUIET)$(CC) -o $@ $^
516

517
518
# "Single servers"
$(SBBSWEB): $(SBBSCON)
519
	@echo Copying $(SBBSCON) to $@ for no good reason
520
521
522
	$(QUIET)cp $(SBBSCON) $@

$(SBBSFTP): $(SBBSCON)
523
	@echo Copying $(SBBSCON) to $@ for no good reason
524
525
526
	$(QUIET)cp $(SBBSCON) $@

$(SBBSMAIL): $(SBBSCON)
527
	@echo Copying $(SBBSCON) to $@ for no good reason
528
529
530
	$(QUIET)cp $(SBBSCON) $@

$(SBBSSRVC): $(SBBSCON)
531
	@echo Copying $(SBBSCON) to $@ for no good reason
532
533
534
	$(QUIET)cp $(SBBSCON) $@

$(SBBS_BBS): $(SBBSCON)
535
	@echo Copying $(SBBSCON) to $@ for no good reason
536
	$(QUIET)cp $(SBBSCON) $@
537
538


539
depend:
540
541
	$(QUIET)$(DELETE) $(LIBODIR)/.depend
	$(QUIET)$(DELETE) $(EXEODIR)/.depend
deuce's avatar
deuce committed
542
	$(MAKE) BUILD_DEPENDS=FORCE
deuce's avatar
deuce committed
543

deuce's avatar
deuce committed
544
FORCE:
545

546
547
-include $(LIBODIR)/.depend
-include $(EXEODIR)/.depend
548
549
-include $(LIBODIR)/*.d
-include $(EXEODIR)/*.d