Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6e614e3

Browse files
committed
Updated the Makefile to work with the new build strategy.
1 parent 8aea8d9 commit 6e614e3

1 file changed

Lines changed: 18 additions & 19 deletions

File tree

Demo/embed/Makefile

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,34 @@
1-
# Makefile for embedded Python use demo
1+
# Makefile for embedded Python use demo.
2+
# (This version tailored for CNRI and Solaris; edit lines marked with XXX.)
23

3-
# Top of the build tree and source tree
4+
# XXX The compiler you are using
5+
CC= gcc
6+
7+
# XXX Top of the build tree and source tree
48
blddir= ../..
59
srcdir= ../..
610

11+
# Python version
12+
VERSION= 1.5
13+
714
# Compiler flags
815
OPT= -g
916
INCLUDES= -I$(srcdir)/Include -I$(blddir)
10-
DEFINES= -DHAVE_CONFIG_H
11-
CFLAGS= $(OPT) $(DEFINES) $(INCLUDES)
17+
CFLAGS= $(OPT) $(INCLUDES)
1218

13-
# Libraries (must be in this order!)
14-
MYLIBS= $(blddir)/Modules/libModules.a \
15-
$(blddir)/Python/libPython.a \
16-
$(blddir)/Objects/libObjects.a \
17-
$(blddir)/Parser/libParser.a
19+
# The Python library
20+
LIBPYTHON= $(blddir)/libpython$(VERSION).a
1821

19-
# XXX edit MODLIBS, LIBS and SYSLIBS to match $(blddir)/Modules/Makefile
20-
MODLIBS=
21-
LIBS=
22+
# XXX edit LIBS (in particular) to match $(blddir)/Modules/Makefile
23+
LIBS= -lsocket -lnsl -ldl -lreadline -ltermcap
2224
SYSLIBS= -lm
23-
ALLLIBS= $(MYLIBS) $(MODLIBS) $(LIBS) $(SYSLIBS)
25+
MODLIBS=
26+
ALLLIBS= $(LIBPYTHON) $(MODLIBS) $(LIBS) $(SYSLIBS)
2427

2528
# Build the demo application
2629
all: demo
27-
demo: demo.o config.o
28-
$(CC) demo.o config.o $(ALLLIBS) -o demo
29-
30-
# Build config.o, suppressing the main() function
31-
config.o: $(blddir)/Modules/config.c
32-
$(CC) $(CFLAGS) -DNO_MAIN -c $(blddir)/Modules/config.c
30+
demo: demo.o
31+
$(CC) demo.o $(ALLLIBS) -o demo
3332

3433
# Administrative targets
3534

0 commit comments

Comments
 (0)