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

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
96
97
98
99
100
CFLAGS  +=  -I$(XPDEV) -I$(UIFC) -DJAVASCRIPT
ifdef JSINCLUDE
 CFLAGS += -I$(JSINCLUDE)
else
 CFLAGS += -I../../include/mozilla/js
endif
101

102
103
ifdef BSD	# BSD
 # Math libraries needed and uses pthread
104
 LFLAGS	:=	-lm -lutil
105
 CFLAGS +=	-pthread 
106
else			# Linux / Other UNIX
107
108
 # Math and pthread libraries needed
 ifdef bcc
109
  LFLAGS	:=	libpthread.so
110
 else
111
  LFLAGS	:=	-lm -lpthread -lutil
112
 endif
113
endif
114

115
116
ifeq ($(os),linux)    # Linux
 CFLAGS	+= -D_THREAD_SUID_BROKEN
117
118
endif

119
ifeq ($(os),sunos)    # Solaris
120
121
 CFLAGS	:= -D_REENTRANT -D__solaris__ -DNEEDS_DAEMON -D_POSIX_PTHREAD_SEMANTICS -DNEEDS_FORKPTY
 LFLAGS := -lm -lpthread -lsocket -lnsl -lrt
122
123
endif

124
ifeq ($(os),netbsd)
125
 CFLAGS += -D_REENTRANT -D__unix__ -I/usr/pkg/include -DNEEDS_FORKPTY
126
 LFLAGS := -lm -lpthread -L/usr/pkg/lib -L/usr/pkg/pthreads/lib
127
 UTIL_LFLAGS	+=	-lpth -L/usr/pkg/lib
128
129
endif

130
# So far, only QNX has sem_timedwait()
131
132
ifeq ($(os),qnx)
 LFLAGS := -lm -lsocket
133
134
135
else
 CFLAGS	+=	-DUSE_XP_SEMAPHORES
 USE_XP_SEMAPHORES	:=	1
136
137
endif

138
ifdef DEBUG
139
140
141
142
143
144
 ifdef bcc
  CFLAGS	+=	-y -v -Od
 else
  CFLAGS	+=	-ggdb
 endif
 CFLAGS  +=	-D_DEBUG
145
146
else
 CFLAGS	+= -O3
147
endif
148

149
150
151
152
ifdef PREFIX
 CFLAGS += -DPREFIX=$(PREFIX)
endif

153
154
155
156
ifdef USE_DOSEMU
 CFLAGS += -DUSE_DOSEMU
endif

157
158
159
160
161
162
163
164
165
166
167
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)
168

169
# The following are needed for echocfg (uses UIFC)
170
UIFC_OBJS =	$(LIBODIR)/uifcx.o
171
ifdef USE_FLTK
172
173
 CFLAGS +=	-DUSE_FLTK -I../../include/fltk
 UIFC_LFLAGS += -L../../lib/fltk/$(os) -L/usr/X11R6/lib -lm -lfltk -lX11
174
 UIFC_OBJS+=	$(LIBODIR)/uifcfltk.o
175
endif
deuce's avatar
deuce committed
176
ifdef USE_CURSES
177
 CFLAGS +=	-DUSE_CURSES
178
179
180
181
182
 ifeq ($(os),qnx)
  UIFC_LFLAGS += -lncurses
 else
  UIFC_LFLAGS += -lcurses
 endif
183
 UIFC_OBJS +=	$(LIBODIR)/uifcc.o
deuce's avatar
deuce committed
184
endif
185

186
187
188
189
190
#The following is needed for nspr support on Linux
ifeq ($(os),linux)
 LFLAGS	+=	-ldl
endif

rswindell's avatar
rswindell committed
191
192
193
include targets.mk		# defines all targets
include objects.mk		# defines $(OBJS)
include sbbsdefs.mk		# defines $(SBBSDEFS)
194

195
196
ifeq ($(USE_XP_SEMAPHORES),1)
 OBJS	+=	$(LIBODIR)$(SLASH)xpsem.$(OFILE)
197
198
endif

199
200
201
202
203
#SBBSLIB	=	$(LIBODIR)$(SLASH)libsbbs.so
SBBSLIB	=	-lsbbs

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

rswindell's avatar
rswindell committed
205
vpath %.c $(XPDEV) $(UIFC)
206
vpath %.cpp $(UIFC)
rswindell's avatar
rswindell committed
207

208
LFLAGS		+=	-L./$(LIBODIR) -L$(NSPRDIR)
209
SBBSLDFLAGS	:=	$(LFLAGS) -rpath-link ./$(LIBODIR) -rpath ./ 
210
211
212
#LFLAGS		+=	-Wl,-rpath-link,./$(LIBODIR),-rpath,./
LFLAGS		+=	-Xlinker -rpath
LFLAGS		+=	-Xlinker .
deuce's avatar
deuce committed
213
214
215
ifneq ($(os),openbsd)
LFLAGS		+=	-Xlinker -rpath-link
LFLAGS		+=	-Xlinker ./$(LIBODIR)
deuce's avatar
deuce committed
216
LFLAGS		+=	-Xlinker -rpath-link
217
LFLAGS		+=	-Xlinker $(JSLIBDIR)
deuce's avatar
deuce committed
218
LFLAGS		+=	-Xlinker -rpath-link
219
LFLAGS		+=	-Xlinker $(NSPRDIR)
220
else
221
LFLAGS		+=	-l$(JSLIB) -lnspr4
deuce's avatar
deuce committed
222
endif
223
224
225
226
227
228
ifeq ($(os),freebsd)
LFLAGS		+=	-pthread
endif
ifeq ($(os),openbsd)
LFLAGS		+=	-pthread
endif
229

230
# Implicit C Compile Rule for SBBS
deuce's avatar
deuce committed
231
$(LIBODIR)/%.o : %.c $(BUILD_DEPENDS)
232
   ifndef bcc
233
	@echo $(COMPILE_MSG) $<
234
   endif
235
	$(QUIET)$(CC) $(CFLAGS) $(SBBSDEFS) -o $@ -c $<
236
237

# Implicit C++ Compile Rule for SBBS
deuce's avatar
deuce committed
238
$(LIBODIR)/%.o : %.cpp $(BUILD_DEPENDS)
239
   ifndef bcc
240
	@echo $(COMPILE_MSG) $<
241
   endif
242
	$(QUIET)$(CCPP) $(CFLAGS) $(SBBSDEFS) -o $@ -c $<
243
244
245
246
247
248
249

$(LIBODIR):
	mkdir $(LIBODIR)

$(EXEODIR):
	mkdir $(EXEODIR)

250
251
CON_OBJS	= $(LIBODIR)/sbbscon.o $(LIBODIR)/conwrap.o \
		  $(LIBODIR)/sbbs_ini.o
252
CON_LDFLAGS	= -lftpsrvr -lwebsrvr -lmailsrvr -lservices
253
FTP_OBJS	= $(LIBODIR)/ftpsrvr.o
254
MAIL_OBJS	= $(LIBODIR)/mailsrvr.o $(LIBODIR)/mxlookup.o \
deuce's avatar
deuce committed
255
 		  $(LIBODIR)/mime.o $(LIBODIR)/base64.o
deuce's avatar
deuce committed
256
WEB_OBJS	= $(LIBODIR)/websrvr.o $(LIBODIR)/sockwrap.o $(LIBODIR)/base64.o
257
SERVICE_OBJS	= $(LIBODIR)/services.o $(LIBODIR)/ini_file.o
258

rswindell's avatar
rswindell committed
259
260
MONO_OBJS	= $(CON_OBJS) $(FTP_OBJS) $(WEB_OBJS) \
			$(MAIL_OBJS) $(SERVICE_OBJS)
261
SMBLIB_OBJS = \
262
263
264
	$(LIBODIR)/smblib.o \
	$(LIBODIR)/filewrap.o \
	$(LIBODIR)/crc16.o
265

266
SHLIBOPTS	:=	-shared
267
268

# Monolithic Synchronet executable Build Rule
269
FORCE$(SBBSMONO): $(MONO_OBJS) $(OBJS) $(LIBS)
deuce's avatar
deuce committed
270
271

$(SBBSMONO): $(MONO_OBJS) $(OBJS) $(LIBS)
272
	@echo Linking $@
273
	$(QUIET)$(CCPP) -o $@ $(LFLAGS) $^
274
275

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

278
$(SBBS): $(OBJS) $(LIBS)
279
	@echo Linking $@
280
	$(QUIET)$(CCPP) $(LFLAGS) -o $@ $^ $(SHLIBOPTS)
281
282

# FTP Server Link Rule
283
FORCE$(FTPSRVR): $(LIBODIR)/ftpsrvr.o $(SBBSLIB)
deuce's avatar
deuce committed
284
285

$(FTPSRVR): $(LIBODIR)/ftpsrvr.o $(SBBSLIB)
286
	@echo Linking $@
287
	$(QUIET)$(CC) $(LFLAGS) $^ $(SHLIBOPTS) -o $@ 
288
289

# Mail Server Link Rule
290
FORCE$(MAILSRVR): $(MAIL_OBJS) $(LIBODIR)$(SLASH)$(SBBSLIB)
deuce's avatar
deuce committed
291
292

$(MAILSRVR): $(MAIL_OBJS) $(SBBSLIB)
293
	@echo Linking $@
294
	$(QUIET)$(CC) $(LFLAGS) $^ $(SHLIBOPTS) -o $@
295
296
297
298
299
300

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

$(WEBSRVR): $(WEB_OBJS) $(SBBSLIB)
	@echo Linking $@
301
	$(QUIET)$(CC) $(LFLAGS) $^ $(SHLIBOPTS) -o $@
302
303
304
305
306
307

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

$(SERVICES): $(SERVICE_OBJS) $(SBBSLIB)
	@echo Linking $@
308
	$(QUIET)$(CC) $(LFLAGS) $^ $(SHLIBOPTS) -o $@
309
310

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

313
314
$(SBBSCON): $(CON_OBJS) $(SBBSLIB) $(FTPSRVR) $(WEBSRVR) $(MAILSRVR) $(SERVICES)
	@echo Linking $@
315
	$(QUIET)$(CC) $(CFLAGS) $(LFLAGS) $(CON_LDFLAGS) -o $@ $(CON_OBJS) $(SBBSLIB)
316
317

# Specifc Compile Rules
deuce's avatar
deuce committed
318
$(LIBODIR)/ftpsrvr.o: ftpsrvr.c ftpsrvr.h $(BUILD_DEPENDS)
319
	@echo $(COMPILE_MSG) $<
320
	$(QUIET)$(CC) $(CFLAGS) -DFTPSRVR_EXPORTS -o $@ -c $<
321

deuce's avatar
deuce committed
322
$(LIBODIR)/mailsrvr.o: mailsrvr.c mailsrvr.h $(BUILD_DEPENDS)
323
	@echo $(COMPILE_MSG) $<
324
	$(QUIET)$(CC) $(CFLAGS) -DMAILSRVR_EXPORTS -o $@ -c $<
325

deuce's avatar
deuce committed
326
$(LIBODIR)/mxlookup.o: mxlookup.c $(BUILD_DEPENDS)
327
	@echo $(COMPILE_MSG) $<
328
	$(QUIET)$(CC) $(CFLAGS) -DMAILSRVR_EXPORTS -o $@ -c $<
329

deuce's avatar
deuce committed
330
$(LIBODIR)/mime.o: mime.c $(BUILD_DEPENDS)
331
	@echo $(COMPILE_MSG) $<
332
	$(QUIET)$(CC) $(CFLAGS) -DMAILSRVR_EXPORTS -o $@ -c $<		
333

deuce's avatar
deuce committed
334
$(LIBODIR)/websrvr.o: websrvr.c websrvr.h $(BUILD_DEPENDS)
335
	@echo $(COMPILE_MSG) $<
336
	$(QUIET)$(CC) $(CFLAGS) -DWEBSRVR_EXPORTS -o $@ -c $<
deuce's avatar
deuce committed
337

deuce's avatar
deuce committed
338
$(LIBODIR)/base64.o: base64.c base64.h $(BUILD_DEPENDS)
339
	@echo $(COMPILE_MSG) $<
340
	$(QUIET)$(CC) $(CFLAGS) -DWEBSRVR_EXPORTS -o $@ -c $<
rswindell's avatar
rswindell committed
341

deuce's avatar
deuce committed
342
$(LIBODIR)/services.o: services.c services.h $(BUILD_DEPENDS)
343
	@echo $(COMPILE_MSG) $<
344
	$(QUIET)$(CC) $(CFLAGS) -DSERVICES_EXPORTS -o $@ -c $<
345
346

# Baja Utility
347
BAJA_OBJS = \
348
349
350
351
352
	$(LIBODIR)/baja.o \
	$(LIBODIR)/ars.o \
	$(LIBODIR)/crc32.o \
	$(LIBODIR)/genwrap.o \
	$(LIBODIR)/filewrap.o
353
FORCE$(BAJA): $(BAJA_OBJS)
deuce's avatar
deuce committed
354

355
$(BAJA): $(BAJA_OBJS)
356
	@echo Linking $@
357
	$(QUIET)$(CC) $(UTIL_LFLAGS) -o $@ $^
358
359

# Node Utility
360
NODE_OBJS = \
361
362
363
	$(LIBODIR)/node.o \
	$(LIBODIR)/genwrap.o \
	$(LIBODIR)/filewrap.o
364
FORCE$(NODE): $(NODE_OBJS)
deuce's avatar
deuce committed
365

366
$(NODE): $(NODE_OBJS)
367
	@echo Linking $@
368
	$(QUIET)$(CC) $(UTIL_LFLAGS) -o $@ $^ 
369
370

# FIXSMB Utility
371
FIXSMB_OBJS = \
372
	$(LIBODIR)/fixsmb.o \
373
	$(SMBLIB_OBJS) \
374
375
	$(LIBODIR)/genwrap.o \
	$(LIBODIR)/str_util.o
376
377
378
FORCE$(FIXSMB): $(FIXSMB_OBJS)
	
$(FIXSMB): $(FIXSMB_OBJS)
379
	@echo Linking $@
380
	$(QUIET)$(CC) $(UTIL_LFLAGS) -o $@ $^
381
382

# CHKSMB Utility
383
CHKSMB_OBJS = \
384
	$(LIBODIR)/chksmb.o \
385
	$(SMBLIB_OBJS) \
386
387
388
	$(LIBODIR)/conwrap.o \
	$(LIBODIR)/dirwrap.o \
	$(LIBODIR)/genwrap.o
389
FORCE$(CHKSMB): $(CHKSMB_OBJS)
deuce's avatar
deuce committed
390

391
$(CHKSMB): $(CHKSMB_OBJS)
392
	@echo Linking $@
393
	$(QUIET)$(CC) $(UTIL_LFLAGS) -o $@ $^
394
395

# SMB Utility
396
SMBUTIL_OBJS = \
397
	$(LIBODIR)/smbutil.o \
398
	$(SMBLIB_OBJS) \
399
400
401
402
403
404
405
406
	$(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
407
408
409
410
FORCE$(SMBUTIL): $(SMBUTIL_OBJS)
	
$(SMBUTIL): $(SMBUTIL_OBJS)
	@echo Linking $@
411
	$(QUIET)$(CC) $(UTIL_LFLAGS) -o $@ $^
deuce's avatar
deuce committed
412

413
414
# SBBSecho (FidoNet Packet Tosser)
SBBSECHO_OBJS = \
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
	$(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 \
430
	$(SMBLIB_OBJS) \
431
432
	$(LIBODIR)/smbtxt.o \
	$(LIBODIR)/lzh.o
433
434
435
436

FORCE$(SBBSECHO): $(SBBSECHO_OBJS)

$(SBBSECHO): $(SBBSECHO_OBJS)
rswindell's avatar
rswindell committed
437
	@echo Linking $@
438
	$(QUIET)$(CC) $(UTIL_LFLAGS) -o $@ $^
rswindell's avatar
rswindell committed
439

rswindell's avatar
rswindell committed
440
# SBBSecho Configuration Program
rswindell's avatar
rswindell committed
441
ECHOCFG_OBJS = \
442
443
	$(LIBODIR)/echocfg.o \
	$(LIBODIR)/rechocfg.o \
deuce's avatar
deuce committed
444
	$(UIFC_OBJS) \
445
446
447
448
449
450
	$(LIBODIR)/nopen.o \
	$(LIBODIR)/crc16.o \
	$(LIBODIR)/str_util.o \
	$(LIBODIR)/filewrap.o \
	$(LIBODIR)/genwrap.o \
	$(LIBODIR)/dirwrap.o
deuce's avatar
deuce committed
451

452
453
454
FORCE$(ECHOCFG): $(ECHOCFG_OBJS)

$(ECHOCFG): $(ECHOCFG_OBJS)
rswindell's avatar
rswindell committed
455
	@echo Linking $@
456
	$(QUIET)$(CC) $(UTIL_LFLAGS) -o $@ $^ $(UIFC_LFLAGS)
rswindell's avatar
rswindell committed
457

rswindell's avatar
rswindell committed
458
# ADDFILES
459
ADDFILES_OBJS = \
460
461
462
463
464
465
466
467
468
469
470
471
	$(LIBODIR)/addfiles.o \
	$(LIBODIR)/ars.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)/filedat.o \
	$(LIBODIR)/dirwrap.o \
472
473
	$(LIBODIR)/genwrap.o \
	$(SMBLIB_OBJS)
deuce's avatar
deuce committed
474

475
476
477
FORCE$(ADDFILES): $(ADDFILES_OBJS)

$(ADDFILES): $(ADDFILES_OBJS)
rswindell's avatar
rswindell committed
478
	@echo Linking $@
479
	$(QUIET)$(CC) $(UTIL_LFLAGS) -o $@ $^
rswindell's avatar
rswindell committed
480

481
# FILELIST
482
FILELIST_OBJS = \
483
484
485
486
487
488
489
490
491
492
493
	$(LIBODIR)/filelist.o \
	$(LIBODIR)/ars.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)/filedat.o \
	$(LIBODIR)/dirwrap.o \
494
495
	$(LIBODIR)/genwrap.o \
	$(SMBLIB_OBJS)
deuce's avatar
deuce committed
496

497
498
499
FORCE$(FILELIST): $(FILELIST_OBJS)

$(FILELIST): $(FILELIST_OBJS)
500
	@echo Linking $@
501
	$(QUIET)$(CC) $(UTIL_LFLAGS) -o $@ $^
502

503
# MAKEUSER
504
MAKEUSER_OBJS = \
505
506
507
508
509
510
511
512
513
514
515
	$(LIBODIR)/makeuser.o \
	$(LIBODIR)/ars.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)/dirwrap.o \
516
517
	$(LIBODIR)/genwrap.o \
	$(SMBLIB_OBJS)
deuce's avatar
deuce committed
518

519
520
521
FORCE$(MAKEUSER): $(MAKEUSER_OBJS)

$(MAKEUSER): $(MAKEUSER_OBJS)
522
	@echo Linking $@
523
	$(QUIET)$(CC) $(UTIL_LFLAGS) -o $@ $^
deuce's avatar
deuce committed
524

rswindell's avatar
rswindell committed
525
526
# JSEXEC
JSEXEC_OBJS = \
527
	$(LIBODIR)/jsexec.o \
528
	$(SBBSLIB)
rswindell's avatar
rswindell committed
529
530
531

FORCE$(JSEXEC): $(JSEXEC_OBJS)

532
$(JSEXEC): $(JSEXEC_OBJS)
rswindell's avatar
rswindell committed
533
	@echo Linking $@
534
	$(QUIET)$(CCPP) $(UTIL_LFLAGS) -o $@ $^ $(LFLAGS)
rswindell's avatar
rswindell committed
535
536
	
# ANS2MSG
537
538
$(ANS2MSG): $(LIBODIR)/ans2msg.o
	@echo Linking $@
539
	$(QUIET)$(CC) $(UTIL_LFLAGS) -o $@ $^
deuce's avatar
deuce committed
540

541
542
543
# MSG2ANS
$(MSG2ANS): $(LIBODIR)/msg2ans.o
	@echo Linking $@
544
	$(QUIET)$(CC) $(UTIL_LFLAGS) -o $@ $^
545

546
depend:
547
548
	$(QUIET)$(DELETE) $(LIBODIR)/.depend
	$(QUIET)$(DELETE) $(EXEODIR)/.depend
deuce's avatar
deuce committed
549
	$(MAKE) BUILD_DEPENDS=FORCE
deuce's avatar
deuce committed
550

deuce's avatar
deuce committed
551
FORCE:
552

553
554
-include $(LIBODIR)/.depend
-include $(EXEODIR)/.depend
555
556
-include $(LIBODIR)/*.d
-include $(EXEODIR)/*.d