GNUmakefile 12.5 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
29
#USE_CURSES =	1	# Use *nix curses version
30
ifndef NO_CURSES
31
 USE_UIFC32      =       1       # Curses version of UIFC
32
endif
deuce's avatar
deuce committed
33

34
ifdef DEBUG
35
 BUILD	=	debug
36
else
37
 BUILD	=	release
38
39
endif

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

rswindell's avatar
rswindell committed
64
UIFC	=	../uifc/
65
XPDEV	=	../xpdev/
66
LIBPREFIX =	lib
67

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

79
80
81
82
83
84
ifeq ($(os),openbsd)
LIBFILE =	.so.0.0
else
LIBFILE	=	.so
endif

85
86
ifeq ($(os),freebsd)
 BSD	=	1
87
else
88
89
90
 ifeq ($(os),openbsd)
  BSD	=	1
 endif
91
endif
92

93
94
LIBODIR :=	$(CCPRE).$(os).lib.$(BUILD)
EXEODIR :=	$(CCPRE).$(os).exe.$(BUILD)
95

96
DELETE	=	rm -f
97

98
99
100
101
102
103
CFLAGS  +=  -I$(XPDEV) -I$(UIFC) -DJAVASCRIPT
ifdef JSINCLUDE
 CFLAGS += -I$(JSINCLUDE)
else
 CFLAGS += -I../../include/mozilla/js
endif
104

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

118
ifeq ($(os),linux)    # Linux
119
120
121
 ifndef THREADS_ACTUALLY_WORK
  CFLAGS	+= -D_THREAD_SUID_BROKEN
 endif
122
123
endif

124
ifeq ($(os),sunos)    # Solaris
125
126
 CFLAGS	:= -D_REENTRANT -D__solaris__ -DNEEDS_DAEMON -D_POSIX_PTHREAD_SEMANTICS -DNEEDS_FORKPTY
 LFLAGS := -lm -lpthread -lsocket -lnsl -lrt
127
128
endif

129
ifeq ($(os),netbsd)
130
 CFLAGS += -D_REENTRANT -D__unix__ -I/usr/pkg/include -DNEEDS_FORKPTY
131
 LFLAGS := -lm -lpthread -L/usr/pkg/lib -L/usr/pkg/pthreads/lib
132
 UTIL_LFLAGS	+=	-lpth -L/usr/pkg/lib
133
134
endif

135
# So far, only QNX has sem_timedwait()
136
137
ifeq ($(os),qnx)
 LFLAGS := -lm -lsocket
138
139
140
else
 CFLAGS	+=	-DUSE_XP_SEMAPHORES
 USE_XP_SEMAPHORES	:=	1
141
142
endif

143
ifdef DEBUG
144
145
146
147
148
149
 ifdef bcc
  CFLAGS	+=	-y -v -Od
 else
  CFLAGS	+=	-ggdb
 endif
 CFLAGS  +=	-D_DEBUG
150
151
else
 CFLAGS	+= -O3
152
endif
153

154
155
156
157
ifdef PREFIX
 CFLAGS += -DPREFIX=$(PREFIX)
endif

158
159
160
161
ifdef USE_DOSEMU
 CFLAGS += -DUSE_DOSEMU
endif

162
163
164
165
166
167
168
169
170
171
ifndef JSLIBDIR
 JSLIBDIR := ../../lib/mozilla/js/$(os).$(BUILD)
endif
ifndef JSLIB
 JSLIB	:=	js
endif
ifndef NSPRDIR
 NSPRDIR := ../../lib/mozilla/nspr/$(os).$(BUILD)
endif

172
173
174
175
ifdef DONT_BLAME_SYNCHRONET
 LFLAGS += -DDONT_BLAME_SYNCHRONET
endif

176
LFLAGS += -L$(JSLIBDIR) -l$(JSLIB)
177

178
# The following are needed for echocfg (uses UIFC)
179
UIFC_OBJS =	$(LIBODIR)/uifcx.o
180
ifdef USE_FLTK
181
182
 CFLAGS +=	-DUSE_FLTK -I../../include/fltk
 UIFC_LFLAGS += -L../../lib/fltk/$(os) -L/usr/X11R6/lib -lm -lfltk -lX11
183
 UIFC_OBJS+=	$(LIBODIR)/uifcfltk.o
184
endif
deuce's avatar
deuce committed
185
ifdef USE_CURSES
186
 CFLAGS +=	-DUSE_CURSES
187
188
189
190
191
 ifeq ($(os),qnx)
  UIFC_LFLAGS += -lncurses
 else
  UIFC_LFLAGS += -lcurses
 endif
192
 UIFC_OBJS +=	$(LIBODIR)/uifcc.o
deuce's avatar
deuce committed
193
endif
194

195
196
197
198
199
200
201
202
203
204
205
ifdef USE_UIFC32
 CFLAGS +=	-DUSE_UIFC32
 ifeq ($(os),qnx)
  UIFC_LFLAGS += -lncurses
 else
  UIFC_LFLAGS += -lcurses
 endif
 UIFC_OBJS +=	$(LIBODIR)/uifc32.o
 UIFC_OBJS +=	$(LIBODIR)/ciowrap.o
endif

206
207
208
209
210
#The following is needed for nspr support on Linux
ifeq ($(os),linux)
 LFLAGS	+=	-ldl
endif

rswindell's avatar
rswindell committed
211
212
213
include targets.mk		# defines all targets
include objects.mk		# defines $(OBJS)
include sbbsdefs.mk		# defines $(SBBSDEFS)
214

215
216
ifeq ($(USE_XP_SEMAPHORES),1)
 OBJS	+=	$(LIBODIR)$(SLASH)xpsem.$(OFILE)
217
218
endif

219
220
221
222
223
#SBBSLIB	=	$(LIBODIR)$(SLASH)libsbbs.so
SBBSLIB	=	-lsbbs

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

rswindell's avatar
rswindell committed
225
vpath %.c $(XPDEV) $(UIFC)
226
vpath %.cpp $(UIFC)
rswindell's avatar
rswindell committed
227

228
LFLAGS		+=	-L./$(LIBODIR) -L$(NSPRDIR)
229
SBBSLDFLAGS	:=	$(LFLAGS) -rpath-link ./$(LIBODIR) -rpath ./ 
230
231
232
#LFLAGS		+=	-Wl,-rpath-link,./$(LIBODIR),-rpath,./
LFLAGS		+=	-Xlinker -rpath
LFLAGS		+=	-Xlinker .
deuce's avatar
deuce committed
233
234
235
ifneq ($(os),openbsd)
LFLAGS		+=	-Xlinker -rpath-link
LFLAGS		+=	-Xlinker ./$(LIBODIR)
deuce's avatar
deuce committed
236
LFLAGS		+=	-Xlinker -rpath-link
237
LFLAGS		+=	-Xlinker $(JSLIBDIR)
deuce's avatar
deuce committed
238
LFLAGS		+=	-Xlinker -rpath-link
239
LFLAGS		+=	-Xlinker $(NSPRDIR)
240
else
241
LFLAGS		+=	-l$(JSLIB) -lnspr4
deuce's avatar
deuce committed
242
endif
243
244
245
246
247
248
ifeq ($(os),freebsd)
LFLAGS		+=	-pthread
endif
ifeq ($(os),openbsd)
LFLAGS		+=	-pthread
endif
249

250
# Implicit C Compile Rule for SBBS
deuce's avatar
deuce committed
251
$(LIBODIR)/%.o : %.c $(BUILD_DEPENDS)
252
   ifndef bcc
253
	@echo $(COMPILE_MSG) $<
254
   endif
255
	$(QUIET)$(CC) $(CFLAGS) $(SBBSDEFS) -o $@ -c $<
256
257

# Implicit C++ Compile Rule for SBBS
deuce's avatar
deuce committed
258
$(LIBODIR)/%.o : %.cpp $(BUILD_DEPENDS)
259
   ifndef bcc
260
	@echo $(COMPILE_MSG) $<
261
   endif
262
	$(QUIET)$(CCPP) $(CFLAGS) $(SBBSDEFS) -o $@ -c $<
263
264
265
266
267
268
269

$(LIBODIR):
	mkdir $(LIBODIR)

$(EXEODIR):
	mkdir $(EXEODIR)

270
271
CON_OBJS	= $(LIBODIR)/sbbscon.o $(LIBODIR)/conwrap.o \
		  $(LIBODIR)/sbbs_ini.o
272
CON_LDFLAGS	= -lftpsrvr -lwebsrvr -lmailsrvr -lservices
273
FTP_OBJS	= $(LIBODIR)/ftpsrvr.o
274
MAIL_OBJS	= $(LIBODIR)/mailsrvr.o $(LIBODIR)/mxlookup.o \
275
 		  $(LIBODIR)/mime.o $(LIBODIR)/base64.o $(LIBODIR)/ini_file.o
deuce's avatar
deuce committed
276
WEB_OBJS	= $(LIBODIR)/websrvr.o $(LIBODIR)/sockwrap.o $(LIBODIR)/base64.o
277
SERVICE_OBJS	= $(LIBODIR)/services.o $(LIBODIR)/ini_file.o
278

rswindell's avatar
rswindell committed
279
280
MONO_OBJS	= $(CON_OBJS) $(FTP_OBJS) $(WEB_OBJS) \
			$(MAIL_OBJS) $(SERVICE_OBJS)
281
SMBLIB_OBJS = \
282
283
284
	$(LIBODIR)/smblib.o \
	$(LIBODIR)/filewrap.o \
	$(LIBODIR)/crc16.o
285

286
SHLIBOPTS	:=	-shared
287
288

# Monolithic Synchronet executable Build Rule
289
FORCE$(SBBSMONO): $(MONO_OBJS) $(OBJS) $(LIBS)
deuce's avatar
deuce committed
290
291

$(SBBSMONO): $(MONO_OBJS) $(OBJS) $(LIBS)
292
	@echo Linking $@
293
	$(QUIET)$(CCPP) -o $@ $(LFLAGS) $^
294
295

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

298
$(SBBS): $(OBJS) $(LIBS)
299
	@echo Linking $@
300
	$(QUIET)$(CCPP) $(LFLAGS) -o $@ $^ $(SHLIBOPTS)
301
302

# FTP Server Link Rule
303
FORCE$(FTPSRVR): $(LIBODIR)/ftpsrvr.o $(SBBSLIB)
deuce's avatar
deuce committed
304
305

$(FTPSRVR): $(LIBODIR)/ftpsrvr.o $(SBBSLIB)
306
	@echo Linking $@
307
	$(QUIET)$(CC) $(LFLAGS) $^ $(SHLIBOPTS) -o $@ 
308
309

# Mail Server Link Rule
310
FORCE$(MAILSRVR): $(MAIL_OBJS) $(LIBODIR)$(SLASH)$(SBBSLIB)
deuce's avatar
deuce committed
311
312

$(MAILSRVR): $(MAIL_OBJS) $(SBBSLIB)
313
	@echo Linking $@
314
	$(QUIET)$(CC) $(LFLAGS) $^ $(SHLIBOPTS) -o $@
315
316
317
318
319
320

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

$(WEBSRVR): $(WEB_OBJS) $(SBBSLIB)
	@echo Linking $@
321
	$(QUIET)$(CC) $(LFLAGS) $^ $(SHLIBOPTS) -o $@
322
323
324
325
326
327

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

$(SERVICES): $(SERVICE_OBJS) $(SBBSLIB)
	@echo Linking $@
328
	$(QUIET)$(CC) $(LFLAGS) $^ $(SHLIBOPTS) -o $@
329
330

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

333
334
$(SBBSCON): $(CON_OBJS) $(SBBSLIB) $(FTPSRVR) $(WEBSRVR) $(MAILSRVR) $(SERVICES)
	@echo Linking $@
335
	$(QUIET)$(CC) $(CFLAGS) $(LFLAGS) $(CON_LDFLAGS) -o $@ $(CON_OBJS) $(SBBSLIB)
336
337

# Specifc Compile Rules
deuce's avatar
deuce committed
338
$(LIBODIR)/ftpsrvr.o: ftpsrvr.c ftpsrvr.h $(BUILD_DEPENDS)
339
	@echo $(COMPILE_MSG) $<
340
	$(QUIET)$(CC) $(CFLAGS) -DFTPSRVR_EXPORTS -o $@ -c $<
341

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

deuce's avatar
deuce committed
346
$(LIBODIR)/mxlookup.o: mxlookup.c $(BUILD_DEPENDS)
347
	@echo $(COMPILE_MSG) $<
348
	$(QUIET)$(CC) $(CFLAGS) -DMAILSRVR_EXPORTS -o $@ -c $<
349

deuce's avatar
deuce committed
350
$(LIBODIR)/mime.o: mime.c $(BUILD_DEPENDS)
351
	@echo $(COMPILE_MSG) $<
352
	$(QUIET)$(CC) $(CFLAGS) -DMAILSRVR_EXPORTS -o $@ -c $<		
353

deuce's avatar
deuce committed
354
$(LIBODIR)/websrvr.o: websrvr.c websrvr.h $(BUILD_DEPENDS)
355
	@echo $(COMPILE_MSG) $<
356
	$(QUIET)$(CC) $(CFLAGS) -DWEBSRVR_EXPORTS -o $@ -c $<
deuce's avatar
deuce committed
357

deuce's avatar
deuce committed
358
$(LIBODIR)/base64.o: base64.c base64.h $(BUILD_DEPENDS)
359
	@echo $(COMPILE_MSG) $<
360
	$(QUIET)$(CC) $(CFLAGS) -DWEBSRVR_EXPORTS -o $@ -c $<
rswindell's avatar
rswindell committed
361

deuce's avatar
deuce committed
362
$(LIBODIR)/services.o: services.c services.h $(BUILD_DEPENDS)
363
	@echo $(COMPILE_MSG) $<
364
	$(QUIET)$(CC) $(CFLAGS) -DSERVICES_EXPORTS -o $@ -c $<
365
366

# Baja Utility
367
BAJA_OBJS = \
368
369
370
371
372
	$(LIBODIR)/baja.o \
	$(LIBODIR)/ars.o \
	$(LIBODIR)/crc32.o \
	$(LIBODIR)/genwrap.o \
	$(LIBODIR)/filewrap.o
373
FORCE$(BAJA): $(BAJA_OBJS)
deuce's avatar
deuce committed
374

375
$(BAJA): $(BAJA_OBJS)
376
	@echo Linking $@
377
	$(QUIET)$(CC) $(UTIL_LFLAGS) -o $@ $^
378
379

# Node Utility
380
NODE_OBJS = \
381
382
383
	$(LIBODIR)/node.o \
	$(LIBODIR)/genwrap.o \
	$(LIBODIR)/filewrap.o
384
FORCE$(NODE): $(NODE_OBJS)
deuce's avatar
deuce committed
385

386
$(NODE): $(NODE_OBJS)
387
	@echo Linking $@
388
	$(QUIET)$(CC) $(UTIL_LFLAGS) -o $@ $^ 
389
390

# FIXSMB Utility
391
FIXSMB_OBJS = \
392
	$(LIBODIR)/fixsmb.o \
393
	$(SMBLIB_OBJS) \
394
	$(LIBODIR)/genwrap.o \
395
	$(LIBODIR)/dirwrap.o \
396
	$(LIBODIR)/str_util.o
397
398
399
FORCE$(FIXSMB): $(FIXSMB_OBJS)
	
$(FIXSMB): $(FIXSMB_OBJS)
400
	@echo Linking $@
401
	$(QUIET)$(CC) $(UTIL_LFLAGS) -o $@ $^
402
403

# CHKSMB Utility
404
CHKSMB_OBJS = \
405
	$(LIBODIR)/chksmb.o \
406
	$(SMBLIB_OBJS) \
407
408
409
	$(LIBODIR)/conwrap.o \
	$(LIBODIR)/dirwrap.o \
	$(LIBODIR)/genwrap.o
410
FORCE$(CHKSMB): $(CHKSMB_OBJS)
deuce's avatar
deuce committed
411

412
$(CHKSMB): $(CHKSMB_OBJS)
413
	@echo Linking $@
414
	$(QUIET)$(CC) $(UTIL_LFLAGS) -o $@ $^
415
416

# SMB Utility
417
SMBUTIL_OBJS = \
418
	$(LIBODIR)/smbutil.o \
419
	$(SMBLIB_OBJS) \
420
421
422
423
424
425
426
427
	$(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
428
429
430
431
FORCE$(SMBUTIL): $(SMBUTIL_OBJS)
	
$(SMBUTIL): $(SMBUTIL_OBJS)
	@echo Linking $@
432
	$(QUIET)$(CC) $(UTIL_LFLAGS) -o $@ $^
deuce's avatar
deuce committed
433

434
435
# SBBSecho (FidoNet Packet Tosser)
SBBSECHO_OBJS = \
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
	$(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 \
451
	$(SMBLIB_OBJS) \
452
453
	$(LIBODIR)/smbtxt.o \
	$(LIBODIR)/lzh.o
454
455
456
457

FORCE$(SBBSECHO): $(SBBSECHO_OBJS)

$(SBBSECHO): $(SBBSECHO_OBJS)
rswindell's avatar
rswindell committed
458
	@echo Linking $@
459
	$(QUIET)$(CC) $(UTIL_LFLAGS) -o $@ $^
rswindell's avatar
rswindell committed
460

rswindell's avatar
rswindell committed
461
# SBBSecho Configuration Program
rswindell's avatar
rswindell committed
462
ECHOCFG_OBJS = \
463
464
	$(LIBODIR)/echocfg.o \
	$(LIBODIR)/rechocfg.o \
deuce's avatar
deuce committed
465
	$(UIFC_OBJS) \
466
467
468
469
470
471
	$(LIBODIR)/nopen.o \
	$(LIBODIR)/crc16.o \
	$(LIBODIR)/str_util.o \
	$(LIBODIR)/filewrap.o \
	$(LIBODIR)/genwrap.o \
	$(LIBODIR)/dirwrap.o
deuce's avatar
deuce committed
472

473
474
475
FORCE$(ECHOCFG): $(ECHOCFG_OBJS)

$(ECHOCFG): $(ECHOCFG_OBJS)
rswindell's avatar
rswindell committed
476
	@echo Linking $@
477
	$(QUIET)$(CC) $(UTIL_LFLAGS) -o $@ $^ $(UIFC_LFLAGS)
rswindell's avatar
rswindell committed
478

rswindell's avatar
rswindell committed
479
# ADDFILES
480
ADDFILES_OBJS = \
481
482
483
484
485
486
487
488
489
490
491
492
	$(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 \
493
494
	$(LIBODIR)/genwrap.o \
	$(SMBLIB_OBJS)
deuce's avatar
deuce committed
495

496
497
498
FORCE$(ADDFILES): $(ADDFILES_OBJS)

$(ADDFILES): $(ADDFILES_OBJS)
rswindell's avatar
rswindell committed
499
	@echo Linking $@
500
	$(QUIET)$(CC) $(UTIL_LFLAGS) -o $@ $^
rswindell's avatar
rswindell committed
501

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

518
519
520
FORCE$(FILELIST): $(FILELIST_OBJS)

$(FILELIST): $(FILELIST_OBJS)
521
	@echo Linking $@
522
	$(QUIET)$(CC) $(UTIL_LFLAGS) -o $@ $^
523

524
# MAKEUSER
525
MAKEUSER_OBJS = \
526
527
528
529
530
531
532
533
534
535
536
	$(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 \
537
538
	$(LIBODIR)/genwrap.o \
	$(SMBLIB_OBJS)
deuce's avatar
deuce committed
539

540
541
542
FORCE$(MAKEUSER): $(MAKEUSER_OBJS)

$(MAKEUSER): $(MAKEUSER_OBJS)
543
	@echo Linking $@
544
	$(QUIET)$(CC) $(UTIL_LFLAGS) -o $@ $^
deuce's avatar
deuce committed
545

rswindell's avatar
rswindell committed
546
547
# JSEXEC
JSEXEC_OBJS = \
548
	$(LIBODIR)/jsexec.o \
549
	$(SBBSLIB)
rswindell's avatar
rswindell committed
550
551
552

FORCE$(JSEXEC): $(JSEXEC_OBJS)

553
$(JSEXEC): $(JSEXEC_OBJS)
rswindell's avatar
rswindell committed
554
	@echo Linking $@
555
	$(QUIET)$(CCPP) $(UTIL_LFLAGS) -o $@ $^ $(LFLAGS)
rswindell's avatar
rswindell committed
556
	
557
# ANS2ASC
558
559
FORCE$(ANS2ASC): $(LIBODIR)/ans2asc.o

560
$(ANS2ASC): $(LIBODIR)/ans2asc.o
561
	@echo Linking $@
562
	$(QUIET)$(CC) $(UTIL_LFLAGS) -o $@ $^
deuce's avatar
deuce committed
563

564
# ASC2ANS
565
566
FORCE$(ASC2ANS): $(LIBODIR)/asc2ans.o

567
$(ASC2ANS): $(LIBODIR)/asc2ans.o
568
	@echo Linking $@
569
	$(QUIET)$(CC) $(UTIL_LFLAGS) -o $@ $^
570

571
depend:
572
573
	$(QUIET)$(DELETE) $(LIBODIR)/.depend
	$(QUIET)$(DELETE) $(EXEODIR)/.depend
deuce's avatar
deuce committed
574
	$(MAKE) BUILD_DEPENDS=FORCE
deuce's avatar
deuce committed
575

deuce's avatar
deuce committed
576
FORCE:
577

578
579
-include $(LIBODIR)/.depend
-include $(EXEODIR)/.depend
580
581
-include $(LIBODIR)/*.d
-include $(EXEODIR)/*.d