Common.gmake 900 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
##########
#
# You really should set SBBS_SRC before calling this.
#
# Available options:
# NEED_JAVASCRIPT   = Set flags for use with JS

SBBS_SRC	?=	$(XPDEV)../sbbs3/
CFLAGS	+=	-I$(SBBS_SRC)

JS_CFLAGS += -DJAVASCRIPT
ifdef JSINCLUDE
 JS_CFLAGS += -I$(JSINCLUDE)
else
 JS_CFLAGS += -I$(XPDEV)../../include/mozilla/js
endif
ifndef JSLIBDIR
deuce's avatar
deuce committed
18
 JSLIBDIR := $(XPDEV)../../lib/mozilla/js/$(machine).$(BUILD)
19
20
21
22
23
endif
ifndef JSLIB
 JSLIB	:=	js
endif
ifndef NSPRDIR
deuce's avatar
deuce committed
24
 NSPRDIR := $(XPDEV)../../lib/mozilla/nspr/$(machine).$(BUILD)
25
26
27
28
29
30
endif
JS_LDFLAGS += -L$(JSLIBDIR) -l$(JSLIB)
#The following is needed for nspr support on Linux
ifeq ($(os),linux)
 JS_LDFLAGS	+=	-ldl
endif
31
JS_LDFLAGS	+=	-L$(NSPRDIR) -lnspr4
32
33
34
35
36
37
38
39
40
41

ifdef NEED_JAVASCRIPT
 CFLAGS	+=	$(JS_CFLAGS)
 LDFLAGS	+=	$(JS_LDFLAGS)
endif

vpath %.c $(SBBS_SRC)
vpath %.cpp $(SBBS_SRC)

SBBSDEFS	:=
42
-include sbbsdefs.mk		# defines $(SBBSDEFS)
43
CFLAGS	+=	$(SBBSDEFS)