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

143
144
145
146
147
148
149
150
151
152
153
ifndef JSLIBDIR
 JSLIBDIR := ../../lib/mozilla/js/$(os).$(BUILD)
endif
ifndef JSLIB
 JSLIB	:=	js
endif
ifndef NSPRDIR
 NSPRDIR := ../../lib/mozilla/nspr/$(os).$(BUILD)
endif

LFLAGS += -L$(JSLIBDIR) -l$(JSLIB)
154

155
# The following are needed for echocfg (uses UIFC)
156
UIFC_OBJS =	$(LIBODIR)/uifcx.o
157
ifdef USE_FLTK
158
159
 CFLAGS +=	-DUSE_FLTK -I../../include/fltk
 UIFC_LFLAGS += -L../../lib/fltk/$(os) -L/usr/X11R6/lib -lm -lfltk -lX11
160
 UIFC_OBJS+=	$(LIBODIR)/uifcfltk.o
161
endif
deuce's avatar
deuce committed
162
ifdef USE_CURSES
163
 CFLAGS +=	-DUSE_CURSES
164
165
166
167
168
 ifeq ($(os),qnx)
  UIFC_LFLAGS += -lncurses
 else
  UIFC_LFLAGS += -lcurses
 endif
169
 UIFC_OBJS +=	$(LIBODIR)/uifcc.o
deuce's avatar
deuce committed
170
endif
171

172
173
174
175
176
#The following is needed for nspr support on Linux
ifeq ($(os),linux)
 LFLAGS	+=	-ldl
endif

rswindell's avatar
rswindell committed
177
178
179
include targets.mk		# defines all targets
include objects.mk		# defines $(OBJS)
include sbbsdefs.mk		# defines $(SBBSDEFS)
180

181
182
ifeq ($(USE_XP_SEMAPHORES),1)
 OBJS	+=	$(LIBODIR)$(SLASH)xpsem.$(OFILE)
183
184
endif

185
186
187
188
189
#SBBSLIB	=	$(LIBODIR)$(SLASH)libsbbs.so
SBBSLIB	=	-lsbbs

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

rswindell's avatar
rswindell committed
191
vpath %.c $(XPDEV) $(UIFC)
192
vpath %.cpp $(UIFC)
rswindell's avatar
rswindell committed
193

194
LFLAGS		+=	-L./$(LIBODIR) -L$(NSPRDIR)
195
SBBSLDFLAGS	:=	$(LFLAGS) -rpath-link ./$(LIBODIR) -rpath ./ 
196
197
198
#LFLAGS		+=	-Wl,-rpath-link,./$(LIBODIR),-rpath,./
LFLAGS		+=	-Xlinker -rpath
LFLAGS		+=	-Xlinker .
deuce's avatar
deuce committed
199
200
201
ifneq ($(os),openbsd)
LFLAGS		+=	-Xlinker -rpath-link
LFLAGS		+=	-Xlinker ./$(LIBODIR)
deuce's avatar
deuce committed
202
LFLAGS		+=	-Xlinker -rpath-link
203
LFLAGS		+=	-Xlinker $(JSLIBDIR)
deuce's avatar
deuce committed
204
LFLAGS		+=	-Xlinker -rpath-link
205
LFLAGS		+=	-Xlinker $(NSPRDIR)
206
else
207
LFLAGS		+=	-l$(JSLIB) -lnspr4
deuce's avatar
deuce committed
208
endif
209
210
211
212
213
214
ifeq ($(os),freebsd)
LFLAGS		+=	-pthread
endif
ifeq ($(os),openbsd)
LFLAGS		+=	-pthread
endif
215

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

# Implicit C++ Compile Rule for SBBS
deuce's avatar
deuce committed
224
$(LIBODIR)/%.o : %.cpp $(BUILD_DEPENDS)
225
   ifndef bcc
226
	@echo $(COMPILE_MSG) $<
227
   endif
228
	$(QUIET)$(CCPP) $(CFLAGS) $(SBBSDEFS) -o $@ -c $<
229
230
231
232
233
234
235

$(LIBODIR):
	mkdir $(LIBODIR)

$(EXEODIR):
	mkdir $(EXEODIR)

236
237
CON_OBJS	= $(LIBODIR)/sbbscon.o $(LIBODIR)/conwrap.o \
		  $(LIBODIR)/sbbs_ini.o
238
CON_LDFLAGS	= -lftpsrvr -lwebsrvr -lmailsrvr -lservices
239
FTP_OBJS	= $(LIBODIR)/ftpsrvr.o
240
MAIL_OBJS	= $(LIBODIR)/mailsrvr.o $(LIBODIR)/mxlookup.o \
deuce's avatar
deuce committed
241
 		  $(LIBODIR)/mime.o $(LIBODIR)/base64.o
deuce's avatar
deuce committed
242
WEB_OBJS	= $(LIBODIR)/websrvr.o $(LIBODIR)/sockwrap.o $(LIBODIR)/base64.o
243
SERVICE_OBJS	= $(LIBODIR)/services.o $(LIBODIR)/ini_file.o
244

rswindell's avatar
rswindell committed
245
246
MONO_OBJS	= $(CON_OBJS) $(FTP_OBJS) $(WEB_OBJS) \
			$(MAIL_OBJS) $(SERVICE_OBJS)
247
SMBLIB_OBJS = \
248
249
250
	$(LIBODIR)/smblib.o \
	$(LIBODIR)/filewrap.o \
	$(LIBODIR)/crc16.o
251

252
SHLIBOPTS	:=	-shared
253
254

# Monolithic Synchronet executable Build Rule
255
FORCE$(SBBSMONO): $(MONO_OBJS) $(OBJS) $(LIBS)
deuce's avatar
deuce committed
256
257

$(SBBSMONO): $(MONO_OBJS) $(OBJS) $(LIBS)
258
	@echo Linking $@
259
	$(QUIET)$(CCPP) -o $@ $(LFLAGS) $^
260
261

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

264
$(SBBS): $(OBJS) $(LIBS)
265
	@echo Linking $@
266
	$(QUIET)$(CCPP) $(LFLAGS) -o $@ $^ $(SHLIBOPTS)
267
268

# FTP Server Link Rule
269
FORCE$(FTPSRVR): $(LIBODIR)/ftpsrvr.o $(SBBSLIB)
deuce's avatar
deuce committed
270
271

$(FTPSRVR): $(LIBODIR)/ftpsrvr.o $(SBBSLIB)
272
	@echo Linking $@
273
	$(QUIET)$(CC) $(LFLAGS) $^ $(SHLIBOPTS) -o $@ 
274
275

# Mail Server Link Rule
276
FORCE$(MAILSRVR): $(MAIL_OBJS) $(LIBODIR)$(SLASH)$(SBBSLIB)
deuce's avatar
deuce committed
277
278

$(MAILSRVR): $(MAIL_OBJS) $(SBBSLIB)
279
	@echo Linking $@
280
	$(QUIET)$(CC) $(LFLAGS) $^ $(SHLIBOPTS) -o $@
281
282
283
284
285
286

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

$(WEBSRVR): $(WEB_OBJS) $(SBBSLIB)
	@echo Linking $@
287
	$(QUIET)$(CC) $(LFLAGS) $^ $(SHLIBOPTS) -o $@
288
289
290
291
292
293

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

$(SERVICES): $(SERVICE_OBJS) $(SBBSLIB)
	@echo Linking $@
294
	$(QUIET)$(CC) $(LFLAGS) $^ $(SHLIBOPTS) -o $@
295
296

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

299
300
$(SBBSCON): $(CON_OBJS) $(SBBSLIB) $(FTPSRVR) $(WEBSRVR) $(MAILSRVR) $(SERVICES)
	@echo Linking $@
301
	$(QUIET)$(CC) $(CFLAGS) $(LFLAGS) $(CON_LDFLAGS) -o $@ $(CON_OBJS) $(SBBSLIB)
302
303

# Specifc Compile Rules
deuce's avatar
deuce committed
304
$(LIBODIR)/ftpsrvr.o: ftpsrvr.c ftpsrvr.h $(BUILD_DEPENDS)
305
	@echo $(COMPILE_MSG) $<
306
	$(QUIET)$(CC) $(CFLAGS) -DFTPSRVR_EXPORTS -o $@ -c $<
307

deuce's avatar
deuce committed
308
$(LIBODIR)/mailsrvr.o: mailsrvr.c mailsrvr.h $(BUILD_DEPENDS)
309
	@echo $(COMPILE_MSG) $<
310
	$(QUIET)$(CC) $(CFLAGS) -DMAILSRVR_EXPORTS -o $@ -c $<
311

deuce's avatar
deuce committed
312
$(LIBODIR)/mxlookup.o: mxlookup.c $(BUILD_DEPENDS)
313
	@echo $(COMPILE_MSG) $<
314
	$(QUIET)$(CC) $(CFLAGS) -DMAILSRVR_EXPORTS -o $@ -c $<
315

deuce's avatar
deuce committed
316
$(LIBODIR)/mime.o: mime.c $(BUILD_DEPENDS)
317
	@echo $(COMPILE_MSG) $<
318
	$(QUIET)$(CC) $(CFLAGS) -DMAILSRVR_EXPORTS -o $@ -c $<		
319

deuce's avatar
deuce committed
320
$(LIBODIR)/websrvr.o: websrvr.c websrvr.h $(BUILD_DEPENDS)
321
	@echo $(COMPILE_MSG) $<
322
	$(QUIET)$(CC) $(CFLAGS) -DWEBSRVR_EXPORTS -o $@ -c $<
deuce's avatar
deuce committed
323

deuce's avatar
deuce committed
324
$(LIBODIR)/base64.o: base64.c base64.h $(BUILD_DEPENDS)
325
	@echo $(COMPILE_MSG) $<
326
	$(QUIET)$(CC) $(CFLAGS) -DWEBSRVR_EXPORTS -o $@ -c $<
rswindell's avatar
rswindell committed
327

deuce's avatar
deuce committed
328
$(LIBODIR)/services.o: services.c services.h $(BUILD_DEPENDS)
329
	@echo $(COMPILE_MSG) $<
330
	$(QUIET)$(CC) $(CFLAGS) -DSERVICES_EXPORTS -o $@ -c $<
331
332

# Baja Utility
333
BAJA_OBJS = \
334
335
336
337
338
	$(LIBODIR)/baja.o \
	$(LIBODIR)/ars.o \
	$(LIBODIR)/crc32.o \
	$(LIBODIR)/genwrap.o \
	$(LIBODIR)/filewrap.o
339
FORCE$(BAJA): $(BAJA_OBJS)
deuce's avatar
deuce committed
340

341
$(BAJA): $(BAJA_OBJS)
342
	@echo Linking $@
343
	$(QUIET)$(CC) -o $@ $^
344
345

# Node Utility
346
NODE_OBJS = \
347
348
349
	$(LIBODIR)/node.o \
	$(LIBODIR)/genwrap.o \
	$(LIBODIR)/filewrap.o
350
FORCE$(NODE): $(NODE_OBJS)
deuce's avatar
deuce committed
351

352
$(NODE): $(NODE_OBJS)
353
	@echo Linking $@
354
	$(QUIET)$(CC) -o $@ $^ 
355
356

# FIXSMB Utility
357
FIXSMB_OBJS = \
358
	$(LIBODIR)/fixsmb.o \
359
	$(SMBLIB_OBJS) \
360
361
	$(LIBODIR)/genwrap.o \
	$(LIBODIR)/str_util.o
362
363
364
FORCE$(FIXSMB): $(FIXSMB_OBJS)
	
$(FIXSMB): $(FIXSMB_OBJS)
365
	@echo Linking $@
366
	$(QUIET)$(CC) -o $@ $^
367
368

# CHKSMB Utility
369
CHKSMB_OBJS = \
370
	$(LIBODIR)/chksmb.o \
371
	$(SMBLIB_OBJS) \
372
373
374
	$(LIBODIR)/conwrap.o \
	$(LIBODIR)/dirwrap.o \
	$(LIBODIR)/genwrap.o
375
FORCE$(CHKSMB): $(CHKSMB_OBJS)
deuce's avatar
deuce committed
376

377
$(CHKSMB): $(CHKSMB_OBJS)
378
	@echo Linking $@
379
	$(QUIET)$(CC) -o $@ $^
380
381

# SMB Utility
382
SMBUTIL_OBJS = \
383
	$(LIBODIR)/smbutil.o \
384
	$(SMBLIB_OBJS) \
385
386
387
388
389
390
391
392
	$(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
393
394
395
396
FORCE$(SMBUTIL): $(SMBUTIL_OBJS)
	
$(SMBUTIL): $(SMBUTIL_OBJS)
	@echo Linking $@
397
	$(QUIET)$(CC) -o $@ $^
deuce's avatar
deuce committed
398

399
400
# SBBSecho (FidoNet Packet Tosser)
SBBSECHO_OBJS = \
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
	$(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 \
416
	$(SMBLIB_OBJS) \
417
418
	$(LIBODIR)/smbtxt.o \
	$(LIBODIR)/lzh.o
419
420
421
422

FORCE$(SBBSECHO): $(SBBSECHO_OBJS)

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

rswindell's avatar
rswindell committed
426
# SBBSecho Configuration Program
rswindell's avatar
rswindell committed
427
ECHOCFG_OBJS = \
428
429
	$(LIBODIR)/echocfg.o \
	$(LIBODIR)/rechocfg.o \
deuce's avatar
deuce committed
430
	$(UIFC_OBJS) \
431
432
433
434
435
436
	$(LIBODIR)/nopen.o \
	$(LIBODIR)/crc16.o \
	$(LIBODIR)/str_util.o \
	$(LIBODIR)/filewrap.o \
	$(LIBODIR)/genwrap.o \
	$(LIBODIR)/dirwrap.o
deuce's avatar
deuce committed
437

438
439
440
FORCE$(ECHOCFG): $(ECHOCFG_OBJS)

$(ECHOCFG): $(ECHOCFG_OBJS)
rswindell's avatar
rswindell committed
441
	@echo Linking $@
442
	$(QUIET)$(CC) -o $@ $^ $(UIFC_LFLAGS)
rswindell's avatar
rswindell committed
443

rswindell's avatar
rswindell committed
444
# ADDFILES
445
ADDFILES_OBJS = \
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
	$(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
461

462
463
464
FORCE$(ADDFILES): $(ADDFILES_OBJS)

$(ADDFILES): $(ADDFILES_OBJS)
rswindell's avatar
rswindell committed
465
	@echo Linking $@
466
	$(QUIET)$(CC) -o $@ $^
rswindell's avatar
rswindell committed
467

468
# FILELIST
469
FILELIST_OBJS = \
470
471
472
473
474
475
476
477
478
479
480
481
482
483
	$(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
484

485
486
487
FORCE$(FILELIST): $(FILELIST_OBJS)

$(FILELIST): $(FILELIST_OBJS)
488
	@echo Linking $@
489
	$(QUIET)$(CC) -o $@ $^
490

491
# MAKEUSER
492
MAKEUSER_OBJS = \
493
494
495
496
497
498
499
500
501
502
503
504
505
506
	$(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
507

508
509
510
FORCE$(MAKEUSER): $(MAKEUSER_OBJS)

$(MAKEUSER): $(MAKEUSER_OBJS)
511
	@echo Linking $@
512
	$(QUIET)$(CC) -o $@ $^
deuce's avatar
deuce committed
513

rswindell's avatar
rswindell committed
514
515
# JSEXEC
JSEXEC_OBJS = \
516
	$(LIBODIR)/jsexec.o \
517
	$(SBBSLIB)
rswindell's avatar
rswindell committed
518
519
520

FORCE$(JSEXEC): $(JSEXEC_OBJS)

521
$(JSEXEC): $(JSEXEC_OBJS)
rswindell's avatar
rswindell committed
522
	@echo Linking $@
523
	$(QUIET)$(CCPP) -o $@ $^ $(LFLAGS)
rswindell's avatar
rswindell committed
524
525
	
# ANS2MSG
526
527
$(ANS2MSG): $(LIBODIR)/ans2msg.o
	@echo Linking $@
528
	$(QUIET)$(CC) -o $@ $^
deuce's avatar
deuce committed
529

530
531
532
# MSG2ANS
$(MSG2ANS): $(LIBODIR)/msg2ans.o
	@echo Linking $@
533
	$(QUIET)$(CC) -o $@ $^
534

535
depend:
536
537
	$(QUIET)$(DELETE) $(LIBODIR)/.depend
	$(QUIET)$(DELETE) $(EXEODIR)/.depend
deuce's avatar
deuce committed
538
	$(MAKE) BUILD_DEPENDS=FORCE
deuce's avatar
deuce committed
539

deuce's avatar
deuce committed
540
FORCE:
541

542
543
-include $(LIBODIR)/.depend
-include $(EXEODIR)/.depend
544
545
-include $(LIBODIR)/*.d
-include $(EXEODIR)/*.d