GNUmakefile 11.8 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

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

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

76
77
78
79
80
81
ifeq ($(os),openbsd)
LIBFILE =	.so.0.0
else
LIBFILE	=	.so
endif

82
83
ifeq ($(os),freebsd)
 BSD	=	1
84
else
85
86
87
 ifeq ($(os),openbsd)
  BSD	=	1
 endif
88
endif
89

90
91
LIBODIR :=	$(CCPRE).$(os).lib.$(BUILD)
EXEODIR :=	$(CCPRE).$(os).exe.$(BUILD)
92

93
DELETE	=	rm -f
94

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

97
98
ifdef BSD	# BSD
 # Math libraries needed and uses pthread
99
 LFLAGS	:=	-lm -lutil
100
 CFLAGS +=	-pthread 
101
else			# Linux / Other UNIX
102
103
 # Math and pthread libraries needed
 ifdef bcc
104
  LFLAGS	:=	libpthread.so
105
 else
106
  LFLAGS	:=	-lm -lpthread -lutil
107
 endif
108
endif
109

110
111
ifeq ($(os),linux)    # Linux
 CFLAGS	+= -D_THREAD_SUID_BROKEN
112
113
endif

114
ifeq ($(os),sunos)    # Solaris
115
116
 CFLAGS	:= -D_REENTRANT -D__solaris__ -DNEEDS_DAEMON -D_POSIX_PTHREAD_SEMANTICS -DNEEDS_FORKPTY
 LFLAGS := -lm -lpthread -lsocket -lnsl -lrt
117
118
endif

119
ifeq ($(os),netbsd)
120
 CFLAGS += -D_REENTRANT -D__unix__ -I/usr/pkg/include -DNEEDS_FORKPTY
121
 LFLAGS := -lm -lpthread -L/usr/pkg/lib -L/usr/pkg/pthreads/lib
122
123
endif

124
# So far, only QNX has sem_timedwait()
125
126
ifeq ($(os),qnx)
 LFLAGS := -lm -lsocket
127
128
129
else
 CFLAGS	+=	-DUSE_XP_SEMAPHORES
 USE_XP_SEMAPHORES	:=	1
130
131
endif

132
ifdef DEBUG
133
134
135
136
137
138
 ifdef bcc
  CFLAGS	+=	-y -v -Od
 else
  CFLAGS	+=	-ggdb
 endif
 CFLAGS  +=	-D_DEBUG
139
140
else
 CFLAGS	+= -O3
141
endif
142

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

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

162
163
164
165
166
#The following is needed for nspr support on Linux
ifeq ($(os),linux)
 LFLAGS	+=	-ldl
endif

rswindell's avatar
rswindell committed
167
168
169
include targets.mk		# defines all targets
include objects.mk		# defines $(OBJS)
include sbbsdefs.mk		# defines $(SBBSDEFS)
170

171
172
ifeq ($(USE_XP_SEMAPHORES),1)
 OBJS	+=	$(LIBODIR)$(SLASH)xpsem.$(OFILE)
173
174
endif

175
176
177
178
179
#SBBSLIB	=	$(LIBODIR)$(SLASH)libsbbs.so
SBBSLIB	=	-lsbbs

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

rswindell's avatar
rswindell committed
181
vpath %.c $(XPDEV) $(UIFC)
182
vpath %.cpp $(UIFC)
rswindell's avatar
rswindell committed
183

184
LFLAGS		+=	-L./$(LIBODIR) -L../../lib/mozilla/js/$(os).$(BUILD) -L../../lib/mozilla/nspr/$(os).$(BUILD)
185
SBBSLDFLAGS	:=	$(LFLAGS) -rpath-link ./$(LIBODIR) -rpath ./ 
186
187
188
#LFLAGS		+=	-Wl,-rpath-link,./$(LIBODIR),-rpath,./
LFLAGS		+=	-Xlinker -rpath
LFLAGS		+=	-Xlinker .
deuce's avatar
deuce committed
189
190
191
ifneq ($(os),openbsd)
LFLAGS		+=	-Xlinker -rpath-link
LFLAGS		+=	-Xlinker ./$(LIBODIR)
deuce's avatar
deuce committed
192
193
194
195
LFLAGS		+=	-Xlinker -rpath-link
LFLAGS		+=	-Xlinker ../../lib/mozilla/js/$(os).$(BUILD)
LFLAGS		+=	-Xlinker -rpath-link
LFLAGS		+=	-Xlinker ../../lib/mozilla/nspr/$(os).$(BUILD)
196
197
else
LFLAGS		+=	-ljs -lnspr4
deuce's avatar
deuce committed
198
endif
199
200
201
202
203
204
ifeq ($(os),freebsd)
LFLAGS		+=	-pthread
endif
ifeq ($(os),openbsd)
LFLAGS		+=	-pthread
endif
205

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

# Implicit C++ Compile Rule for SBBS
deuce's avatar
deuce committed
214
$(LIBODIR)/%.o : %.cpp $(BUILD_DEPENDS)
215
   ifndef bcc
216
	@echo $(COMPILE_MSG) $<
217
   endif
218
	$(QUIET)$(CCPP) $(CFLAGS) $(SBBSDEFS) -o $@ -c $<
219
220
221
222
223
224
225

$(LIBODIR):
	mkdir $(LIBODIR)

$(EXEODIR):
	mkdir $(EXEODIR)

226
227
CON_OBJS	= $(LIBODIR)/sbbscon.o $(LIBODIR)/conwrap.o \
		  $(LIBODIR)/sbbs_ini.o
228
CON_LDFLAGS	= -lftpsrvr -lwebsrvr -lmailsrvr -lservices
229
FTP_OBJS	= $(LIBODIR)/ftpsrvr.o
230
MAIL_OBJS	= $(LIBODIR)/mailsrvr.o $(LIBODIR)/mxlookup.o \
deuce's avatar
deuce committed
231
 		  $(LIBODIR)/mime.o $(LIBODIR)/base64.o
deuce's avatar
deuce committed
232
WEB_OBJS	= $(LIBODIR)/websrvr.o $(LIBODIR)/sockwrap.o $(LIBODIR)/base64.o
233
SERVICE_OBJS	= $(LIBODIR)/services.o $(LIBODIR)/ini_file.o
234

rswindell's avatar
rswindell committed
235
236
MONO_OBJS	= $(CON_OBJS) $(FTP_OBJS) $(WEB_OBJS) \
			$(MAIL_OBJS) $(SERVICE_OBJS)
237
SMBLIB_OBJS = \
238
239
240
	$(LIBODIR)/smblib.o \
	$(LIBODIR)/filewrap.o \
	$(LIBODIR)/crc16.o
241

242
SHLIBOPTS	:=	-shared
243
244

# Monolithic Synchronet executable Build Rule
245
FORCE$(SBBSMONO): $(MONO_OBJS) $(OBJS) $(LIBS)
deuce's avatar
deuce committed
246
247

$(SBBSMONO): $(MONO_OBJS) $(OBJS) $(LIBS)
248
	@echo Linking $@
249
	$(QUIET)$(CCPP) -o $@ $(LFLAGS) $^ $(JSLIB)
250
251

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

254
$(SBBS): $(OBJS) $(LIBS)
255
	@echo Linking $@
256
	$(QUIET)$(CCPP) $(LFLAGS) -o $@ $(JSLIB) $^ $(SHLIBOPTS)
257
258

# FTP Server Link Rule
259
FORCE$(FTPSRVR): $(LIBODIR)/ftpsrvr.o $(SBBSLIB)
deuce's avatar
deuce committed
260
261

$(FTPSRVR): $(LIBODIR)/ftpsrvr.o $(SBBSLIB)
262
	@echo Linking $@
263
	$(QUIET)$(CC) $(LFLAGS) $^ $(JSLIB) $(SHLIBOPTS) -o $@ 
264
265

# Mail Server Link Rule
266
FORCE$(MAILSRVR): $(MAIL_OBJS) $(LIBODIR)$(SLASH)$(SBBSLIB)
deuce's avatar
deuce committed
267
268

$(MAILSRVR): $(MAIL_OBJS) $(SBBSLIB)
269
	@echo Linking $@
270
	$(QUIET)$(CC) $(LFLAGS) $^ $(JSLIB) $(SHLIBOPTS) -o $@
271
272
273
274
275
276

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

$(WEBSRVR): $(WEB_OBJS) $(SBBSLIB)
	@echo Linking $@
277
	$(QUIET)$(CC) $(LFLAGS) $^ $(JSLIB) $(SHLIBOPTS) -o $@
278
279
280
281
282
283

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

$(SERVICES): $(SERVICE_OBJS) $(SBBSLIB)
	@echo Linking $@
284
	$(QUIET)$(CC) $(LFLAGS) $^ $(JSLIB) $(SHLIBOPTS) -o $@
285
286

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

289
290
$(SBBSCON): $(CON_OBJS) $(SBBSLIB) $(FTPSRVR) $(WEBSRVR) $(MAILSRVR) $(SERVICES)
	@echo Linking $@
291
	$(QUIET)$(CC) $(CFLAGS) $(LFLAGS) $(CON_LDFLAGS) -o $@ $(CON_OBJS) $(SBBSLIB)
292
293

# Specifc Compile Rules
deuce's avatar
deuce committed
294
$(LIBODIR)/ftpsrvr.o: ftpsrvr.c ftpsrvr.h $(BUILD_DEPENDS)
295
	@echo $(COMPILE_MSG) $<
296
	$(QUIET)$(CC) $(CFLAGS) -DFTPSRVR_EXPORTS -o $@ -c $<
297

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

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

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

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

deuce's avatar
deuce committed
314
$(LIBODIR)/base64.o: base64.c base64.h $(BUILD_DEPENDS)
315
	@echo $(COMPILE_MSG) $<
316
	$(QUIET)$(CC) $(CFLAGS) -DWEBSRVR_EXPORTS -o $@ -c $<
rswindell's avatar
rswindell committed
317

deuce's avatar
deuce committed
318
$(LIBODIR)/services.o: services.c services.h $(BUILD_DEPENDS)
319
	@echo $(COMPILE_MSG) $<
320
	$(QUIET)$(CC) $(CFLAGS) -DSERVICES_EXPORTS -o $@ -c $<
321
322

# Baja Utility
323
BAJA_OBJS = \
324
325
326
327
328
	$(LIBODIR)/baja.o \
	$(LIBODIR)/ars.o \
	$(LIBODIR)/crc32.o \
	$(LIBODIR)/genwrap.o \
	$(LIBODIR)/filewrap.o
329
FORCE$(BAJA): $(BAJA_OBJS)
deuce's avatar
deuce committed
330

331
$(BAJA): $(BAJA_OBJS)
332
	@echo Linking $@
333
	$(QUIET)$(CC) -o $@ $^
334
335

# Node Utility
336
NODE_OBJS = \
337
338
339
	$(LIBODIR)/node.o \
	$(LIBODIR)/genwrap.o \
	$(LIBODIR)/filewrap.o
340
FORCE$(NODE): $(NODE_OBJS)
deuce's avatar
deuce committed
341

342
$(NODE): $(NODE_OBJS)
343
	@echo Linking $@
344
	$(QUIET)$(CC) -o $@ $^ 
345
346

# FIXSMB Utility
347
FIXSMB_OBJS = \
348
	$(LIBODIR)/fixsmb.o \
349
	$(SMBLIB_OBJS) \
350
351
	$(LIBODIR)/genwrap.o \
	$(LIBODIR)/str_util.o
352
353
354
FORCE$(FIXSMB): $(FIXSMB_OBJS)
	
$(FIXSMB): $(FIXSMB_OBJS)
355
	@echo Linking $@
356
	$(QUIET)$(CC) -o $@ $^
357
358

# CHKSMB Utility
359
CHKSMB_OBJS = \
360
	$(LIBODIR)/chksmb.o \
361
	$(SMBLIB_OBJS) \
362
363
364
	$(LIBODIR)/conwrap.o \
	$(LIBODIR)/dirwrap.o \
	$(LIBODIR)/genwrap.o
365
FORCE$(CHKSMB): $(CHKSMB_OBJS)
deuce's avatar
deuce committed
366

367
$(CHKSMB): $(CHKSMB_OBJS)
368
	@echo Linking $@
369
	$(QUIET)$(CC) -o $@ $^
370
371

# SMB Utility
372
SMBUTIL_OBJS = \
373
	$(LIBODIR)/smbutil.o \
374
	$(SMBLIB_OBJS) \
375
376
377
378
379
380
381
382
	$(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
383
384
385
386
FORCE$(SMBUTIL): $(SMBUTIL_OBJS)
	
$(SMBUTIL): $(SMBUTIL_OBJS)
	@echo Linking $@
387
	$(QUIET)$(CC) -o $@ $^
deuce's avatar
deuce committed
388

389
390
# SBBSecho (FidoNet Packet Tosser)
SBBSECHO_OBJS = \
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
	$(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 \
406
	$(SMBLIB_OBJS) \
407
408
	$(LIBODIR)/smbtxt.o \
	$(LIBODIR)/lzh.o
409
410
411
412

FORCE$(SBBSECHO): $(SBBSECHO_OBJS)

$(SBBSECHO): $(SBBSECHO_OBJS)
rswindell's avatar
rswindell committed
413
	@echo Linking $@
414
	$(QUIET)$(CC) -o $@ $^
rswindell's avatar
rswindell committed
415

rswindell's avatar
rswindell committed
416
# SBBSecho Configuration Program
rswindell's avatar
rswindell committed
417
ECHOCFG_OBJS = \
418
419
	$(LIBODIR)/echocfg.o \
	$(LIBODIR)/rechocfg.o \
deuce's avatar
deuce committed
420
	$(UIFC_OBJS) \
421
422
423
424
425
426
	$(LIBODIR)/nopen.o \
	$(LIBODIR)/crc16.o \
	$(LIBODIR)/str_util.o \
	$(LIBODIR)/filewrap.o \
	$(LIBODIR)/genwrap.o \
	$(LIBODIR)/dirwrap.o
deuce's avatar
deuce committed
427

428
429
430
FORCE$(ECHOCFG): $(ECHOCFG_OBJS)

$(ECHOCFG): $(ECHOCFG_OBJS)
rswindell's avatar
rswindell committed
431
	@echo Linking $@
432
	$(QUIET)$(CC) -o $@ $^ $(UIFC_LFLAGS)
rswindell's avatar
rswindell committed
433

rswindell's avatar
rswindell committed
434
# ADDFILES
435
ADDFILES_OBJS = \
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
	$(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
451

452
453
454
FORCE$(ADDFILES): $(ADDFILES_OBJS)

$(ADDFILES): $(ADDFILES_OBJS)
rswindell's avatar
rswindell committed
455
	@echo Linking $@
456
	$(QUIET)$(CC) -o $@ $^
rswindell's avatar
rswindell committed
457

458
# FILELIST
459
FILELIST_OBJS = \
460
461
462
463
464
465
466
467
468
469
470
471
472
473
	$(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
474

475
476
477
FORCE$(FILELIST): $(FILELIST_OBJS)

$(FILELIST): $(FILELIST_OBJS)
478
	@echo Linking $@
479
	$(QUIET)$(CC) -o $@ $^
480

481
# MAKEUSER
482
MAKEUSER_OBJS = \
483
484
485
486
487
488
489
490
491
492
493
494
495
496
	$(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
497

498
499
500
FORCE$(MAKEUSER): $(MAKEUSER_OBJS)

$(MAKEUSER): $(MAKEUSER_OBJS)
501
	@echo Linking $@
502
	$(QUIET)$(CC) -o $@ $^
deuce's avatar
deuce committed
503

rswindell's avatar
rswindell committed
504
505
# JSEXEC
JSEXEC_OBJS = \
506
	$(LIBODIR)/jsexec.o \
507
	$(SBBSLIB)
rswindell's avatar
rswindell committed
508
509
510

FORCE$(JSEXEC): $(JSEXEC_OBJS)

511
$(JSEXEC): $(JSEXEC_OBJS)
rswindell's avatar
rswindell committed
512
	@echo Linking $@
513
	$(QUIET)$(CCPP) -o $@ $^ $(LFLAGS)
rswindell's avatar
rswindell committed
514
515
	
# ANS2MSG
516
517
$(ANS2MSG): $(LIBODIR)/ans2msg.o
	@echo Linking $@
518
	$(QUIET)$(CC) -o $@ $^
deuce's avatar
deuce committed
519

520
521
522
# MSG2ANS
$(MSG2ANS): $(LIBODIR)/msg2ans.o
	@echo Linking $@
523
	$(QUIET)$(CC) -o $@ $^
524

525
depend:
526
527
	$(QUIET)$(DELETE) $(LIBODIR)/.depend
	$(QUIET)$(DELETE) $(EXEODIR)/.depend
deuce's avatar
deuce committed
528
	$(MAKE) BUILD_DEPENDS=FORCE
deuce's avatar
deuce committed
529

deuce's avatar
deuce committed
530
FORCE:
531

532
533
-include $(LIBODIR)/.depend
-include $(EXEODIR)/.depend
534
535
-include $(LIBODIR)/*.d
-include $(EXEODIR)/*.d