targets.mk 4.83 KB
Newer Older
rswindell's avatar
rswindell committed
1
2
3
4
# targets.mk

# Make 'include file' defining targets for Synchronet project

5
# $Id: targets.mk,v 1.54 2020/05/14 20:32:04 rswindell Exp $
rswindell's avatar
rswindell committed
6

7
8
9
10
11
12
13
14
15
16
# LIBODIR, EXEODIR, DIRSEP, LIBFILE, EXEFILE, and DELETE must be pre-defined

SBBS		= $(LIBODIR)$(DIRSEP)$(LIBPREFIX)sbbs$(SOFILE)
FTPSRVR		= $(LIBODIR)$(DIRSEP)$(LIBPREFIX)ftpsrvr$(SOFILE)
WEBSRVR		= $(LIBODIR)$(DIRSEP)$(LIBPREFIX)websrvr$(SOFILE)
MAILSRVR	= $(LIBODIR)$(DIRSEP)$(LIBPREFIX)mailsrvr$(SOFILE)
SERVICES	= $(LIBODIR)$(DIRSEP)$(LIBPREFIX)services$(SOFILE)
SBBSCON		= $(EXEODIR)$(DIRSEP)sbbs$(EXEFILE)
SBBSMONO	= $(EXEODIR)$(DIRSEP)sbbsmono$(EXEFILE)
JSEXEC		= $(EXEODIR)$(DIRSEP)jsexec$(EXEFILE)
17
JSDOOR		= $(EXEODIR)$(DIRSEP)jsdoor$(EXEFILE)
18
19
NODE		= $(EXEODIR)$(DIRSEP)node$(EXEFILE)
BAJA		= $(EXEODIR)$(DIRSEP)baja$(EXEFILE)
20
UNBAJA		= $(EXEODIR)$(DIRSEP)unbaja$(EXEFILE)
21
22
23
24
25
26
27
28
29
30
FIXSMB		= $(EXEODIR)$(DIRSEP)fixsmb$(EXEFILE)
CHKSMB		= $(EXEODIR)$(DIRSEP)chksmb$(EXEFILE)
SMBUTIL		= $(EXEODIR)$(DIRSEP)smbutil$(EXEFILE)
SBBSECHO	= $(EXEODIR)$(DIRSEP)sbbsecho$(EXEFILE)
ECHOCFG		= $(EXEODIR)$(DIRSEP)echocfg$(EXEFILE)
ADDFILES	= $(EXEODIR)$(DIRSEP)addfiles$(EXEFILE)
FILELIST	= $(EXEODIR)$(DIRSEP)filelist$(EXEFILE)
MAKEUSER	= $(EXEODIR)$(DIRSEP)makeuser$(EXEFILE)
ANS2ASC		= $(EXEODIR)$(DIRSEP)ans2asc$(EXEFILE)
ASC2ANS		= $(EXEODIR)$(DIRSEP)asc2ans$(EXEFILE)
deuce's avatar
deuce committed
31
SEXYZ		= $(EXEODIR)$(DIRSEP)sexyz$(EXEFILE)
deuce's avatar
deuce committed
32
QWKNODES	= $(EXEODIR)$(DIRSEP)qwknodes$(EXEFILE)
deuce's avatar
deuce committed
33
SLOG		= $(EXEODIR)$(DIRSEP)slog$(EXEFILE)
34
ALLUSERS	= $(EXEODIR)$(DIRSEP)allusers$(EXEFILE)
deuce's avatar
deuce committed
35
DELFILES	= $(EXEODIR)$(DIRSEP)delfiles$(EXEFILE)
deuce's avatar
deuce committed
36
DUPEFIND	= $(EXEODIR)$(DIRSEP)dupefind$(EXEFILE)
deuce's avatar
deuce committed
37
SMBACTIV	= $(EXEODIR)$(DIRSEP)smbactiv$(EXEFILE)
38
DSTSEDIT	= $(EXEODIR)$(DIRSEP)dstsedit$(EXEFILE)
deuce's avatar
deuce committed
39
READSAUCE	= $(EXEODIR)$(DIRSEP)readsauce$(EXEFILE)
40
SHOWSTAT	= $(EXEODIR)$(DIRSEP)showstat$(EXEFILE)
41
42
PKTDUMP		= $(EXEODIR)$(DIRSEP)pktdump$(EXEFILE)
FMSGDUMP	= $(EXEODIR)$(DIRSEP)fmsgdump$(EXEFILE)
rswindell's avatar
rswindell committed
43

44
45
46
47
48
49
UTILS		= $(FIXSMB) $(CHKSMB) \
			  $(SMBUTIL) $(BAJA) $(NODE) \
			  $(SBBSECHO) $(ECHOCFG) \
			  $(ADDFILES) $(FILELIST) $(MAKEUSER) \
			  $(ANS2ASC) $(ASC2ANS)  $(UNBAJA) \
			  $(QWKNODES) $(SLOG) $(ALLUSERS) \
50
			  $(DELFILES) $(DUPEFIND) $(SMBACTIV) \
51
52
			  $(SEXYZ) $(DSTSEDIT) $(READSAUCE) $(SHOWSTAT) \
			  $(PKTDUMP) $(FMSGDUMP)
rswindell's avatar
rswindell committed
53

54
all:	dlls utils console scfg uedit umonitor
55

56
57
58
59
60
61
62
63
64
65
66
67
68
69
# These include sbbs.h, so need JS_DEPS filled before they can build.
$(ADDFILES}: $(JS_DEPS)
${ALLUSERS}: $(JS_DEPS)
${DELFILES}: $(JS_DEPS)
$(DSTSEDIT): $(JS_DEPS)
$(DUPEFIND): $(JS_DEPS)
$(ECHOCFG): $(JS_DEPS)
$(FILELIST): $(JS_DEPS)
$(MAKEUSER): $(JS_DEPS)
$(QWKNODES): $(JS_DEPS)
$(SBBSECHO): $(JS_DEPS)
$(SMBACTIV): $(JS_DEPS)
$(SMBUTIL): $(JS_DEPS)

deuce's avatar
deuce committed
70
console:	$(JS_DEPS) xpdev-mt smblib \
71
72
		$(MTOBJODIR) $(LIBODIR) $(EXEODIR) \
		dlls \
73
		$(SBBSCON) $(JSEXEC)
rswindell's avatar
rswindell committed
74

75
76
77
78
utils:	smblib xpdev-mt xpdev ciolib-mt uifc-mt \
		$(LIBODIR) $(OBJODIR) $(MTOBJODIR) $(EXEODIR) \
		$(UTILS)

79
80
gtkutils: gtkmonitor gtkchat gtkuseredit gtkuserlist

deuce's avatar
deuce committed
81
dlls:	$(JS_DEPS) smblib xpdev-mt \
82
		$(MTOBJODIR) $(LIBODIR) \
rswindell's avatar
rswindell committed
83
84
		$(SBBS) $(FTPSRVR) $(MAILSRVR) $(SERVICES)

85
86
87
mono:	xpdev-mt smblib \
		$(MTOBJODIR) $(EXEODIR) \
		$(SBBSMONO)
88

89
90
.PHONY: scfg
scfg:
91
	$(MAKE) -C scfg $(MAKEFLAGS)
92
93
94

.PHONY: uedit
uedit:
95
	$(MAKE) -C uedit $(MAKEFLAGS)
96
97
98

.PHONY: umonitor
umonitor:
99
	$(MAKE) -C umonitor $(MAKEFLAGS)
100

101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
.PHONY: gtkmonitor
gtkmonitor:
	$(MAKE) -C gtkmonitor $(MAKEFLAGS)

.PHONY: gtkchat
gtkchat:
	$(MAKE) -C gtkchat $(MAKEFLAGS)

.PHONY: gtkuseredit
gtkuseredit:
	$(MAKE) -C gtkuseredit $(MAKEFLAGS)

.PHONY: gtkuserlist
gtkuserlist:
	$(MAKE) -C gtkuserlist $(MAKEFLAGS)
116

117
118
ifdef SBBSEXEC
.PHONY: install
119
install: all
120
121
	install $(EXEODIR)/* $(SBBSEXEC)
	install $(LIBODIR)/* $(SBBSEXEC)
122
	install */$(EXEODIR)/* $(SBBSEXEC)
123
124

.PHONY: symlinks
125
symlinks: all
126
127
	ln -sfr $(EXEODIR)/* $(SBBSEXEC)
	ln -sfr $(LIBODIR)/* $(SBBSEXEC)
128
	ln -sfr */$(EXEODIR)/* $(SBBSEXEC)
129
130
endif

131
132
133
134
135
136
ifeq ($(os),linux)
.PHONY: setcap
setcap: all
	sudo setcap 'cap_net_bind_service=+ep' $(EXEODIR)/sbbs
endif

137
138
139
.PHONY: sexyz
sexyz:	$(SEXYZ)

140
.PHONY: jsdoor
deuce's avatar
deuce committed
141
jsdoor: $(JS_DEPS) $(CRYPT_DEPS) $(XPDEV-MT_LIB) $(SMBLIB) $(UIFCLIB-MT) $(CIOLIB-MT) $(JSDOOR)
142
143
144
145
146
147
148
149
150
151

# Library dependencies
$(SBBS): 
$(FTPSRVR): 
$(WEBSRVR):
$(MAILSRVR):
$(SERVICES): 
$(SBBSCON): $(XPDEV-MT_LIB) $(SMBLIB)
$(SBBSMONO): $(XPDEV-MT_LIB) $(SMBLIB)
$(JSEXEC): $(XPDEV-MT_LIB) $(SMBLIB)
152
$(JSDOOR): $(XPDEV-MT_LIB)
153
154
$(NODE): $(XPDEV_LIB)
$(BAJA): $(XPDEV_LIB) $(SMBLIB)
deuce's avatar
deuce committed
155
$(UNBAJA): $(XPDEV_LIB)
156
157
158
159
160
161
162
163
164
165
$(FIXSMB): $(XPDEV_LIB) $(SMBLIB)
$(CHKSMB): $(XPDEV_LIB) $(SMBLIB)
$(SMBUTIL): $(XPDEV_LIB) $(SMBLIB)
$(SBBSECHO): $(XPDEV_LIB) $(SMBLIB)
$(ECHOCFG): $(XPDEV-MT_LIB) $(SMBLIB) $(UIFCLIB-MT) $(CIOLIB-MT)
$(ADDFILES): $(XPDEV_LIB)
$(FILELIST): $(XPDEV_LIB)
$(MAKEUSER): $(XPDEV_LIB)
$(ANS2ASC):
$(ASC2ANS):
deuce's avatar
deuce committed
166
$(SEXYZ): $(XPDEV-MT_LIB) $(SMBLIB)
deuce's avatar
deuce committed
167
$(QWKNODES): $(XPDEV_LIB)
deuce's avatar
deuce committed
168
$(SLOG): $(XPDEV_LIB)
169
$(ALLUSERS): $(XPDEV_LIB)
deuce's avatar
deuce committed
170
$(DELFILES): $(XPDEV_LIB)
deuce's avatar
deuce committed
171
$(DUPEFIND): $(XPDEV_LIB) $(SMBLIB)
deuce's avatar
deuce committed
172
$(SMBACTIV): $(XPDEV_LIB) $(SMBLIB)
173
$(DSTSEDIT): $(XPDEV_LIB)
deuce's avatar
deuce committed
174
$(READSAUCE): $(XPDEV_LIB)
175
$(SHOWSTAT): $(XPDEV_LIB)