-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
57 lines (41 loc) · 1.38 KB
/
Makefile
File metadata and controls
57 lines (41 loc) · 1.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# Makefile for embedded Python use demo
CC= gcc
LD= ld -G
# Target
# for 2.0 servers "_nsapy20.so"
# for 3.0 servers "_nsapy30.so"
TARGET=_nsapy30.so
# Top of the build tree and source tree
blddir= ../adm/Python-1.4/
srcdir= ../adm/Python-1.4/
# Netscape include directory
nsdir= /usr/ns-home/nsapi/include
#nsdir= /usr/netscape/suitespot/include
# Compiler flags
OPT= -g -Wall
INCLUDES= -I$(srcdir)/Include -I$(blddir) -I$(nsdir)
DEFINES= -DHAVE_CONFIG_H -DNET_SSL -DSOLARIS -DREENTRANT -DMCC_HTTPD -DXP_UNIX
CFLAGS= $(OPT) $(DEFINES) $(INCLUDES)
# Libraries (must be in this order!)
PYLIBS= $(blddir)/Modules/libModules.a \
$(blddir)/Python/libPython.a \
$(blddir)/Objects/libObjects.a \
$(blddir)/Parser/libParser.a
# XXX edit MODLIBS, LIBS and SYSLIBS to match $(blddir)/Modules/Makefile
MODLIBS= $(LOCALMODLIBS) $(BASEMODLIBS)
LIBS= -lsocket -lnsl -ldl
SYSLIBS= -lm $(LIBM) $(LIBC)
ALLLIBS= $(PYLIBS) $(MODLIBS) $(LIBS) $(SYSLIBS)
all: $(TARGET)
$(TARGET): nsapimod.o config.o getpath.o
$(LD) nsapimod.o config.o getpath.o $(ALLLIBS) -o $(TARGET)
# Build config.o, suppressing the main() function
config.o: $(blddir)/Modules/config.c
$(CC) $(CFLAGS) -DNO_MAIN -c $(blddir)/Modules/config.c
getpath.o: $(blddir)/Modules/getpath.c
$(CC) $(CFLAGS) -c $(blddir)/Modules/getpath.c
# Administrative targets
clean:
-rm -f *.o core
clobber: clean
-rm -f *~ @* '#'* _nsapy20.so