1997-07-19 20:58:50 +00:00
|
|
|
# Makefile for embedded Python use demo.
|
|
|
|
# (This version tailored for CNRI and Solaris; edit lines marked with XXX.)
|
1994-10-08 19:30:50 +00:00
|
|
|
|
1997-07-19 20:58:50 +00:00
|
|
|
# XXX The compiler you are using
|
|
|
|
CC= gcc
|
|
|
|
|
|
|
|
# XXX Top of the build tree and source tree
|
1994-10-08 19:30:50 +00:00
|
|
|
blddir= ../..
|
|
|
|
srcdir= ../..
|
|
|
|
|
1997-07-19 20:58:50 +00:00
|
|
|
# Python version
|
|
|
|
VERSION= 1.5
|
|
|
|
|
1994-10-08 19:30:50 +00:00
|
|
|
# Compiler flags
|
|
|
|
OPT= -g
|
|
|
|
INCLUDES= -I$(srcdir)/Include -I$(blddir)
|
1997-07-19 20:58:50 +00:00
|
|
|
CFLAGS= $(OPT) $(INCLUDES)
|
1994-10-08 19:30:50 +00:00
|
|
|
|
1997-07-19 20:58:50 +00:00
|
|
|
# The Python library
|
|
|
|
LIBPYTHON= $(blddir)/libpython$(VERSION).a
|
1995-03-28 09:22:53 +00:00
|
|
|
|
1997-07-19 20:58:50 +00:00
|
|
|
# XXX edit LIBS (in particular) to match $(blddir)/Modules/Makefile
|
|
|
|
LIBS= -lsocket -lnsl -ldl -lreadline -ltermcap
|
1994-10-08 19:30:50 +00:00
|
|
|
SYSLIBS= -lm
|
1997-07-19 20:58:50 +00:00
|
|
|
MODLIBS=
|
|
|
|
ALLLIBS= $(LIBPYTHON) $(MODLIBS) $(LIBS) $(SYSLIBS)
|
1994-10-08 19:30:50 +00:00
|
|
|
|
|
|
|
# Build the demo application
|
|
|
|
all: demo
|
1997-07-19 20:58:50 +00:00
|
|
|
demo: demo.o
|
|
|
|
$(CC) demo.o $(ALLLIBS) -o demo
|
1994-10-08 19:30:50 +00:00
|
|
|
|
|
|
|
# Administrative targets
|
|
|
|
|
|
|
|
test: demo
|
|
|
|
./demo
|
|
|
|
|
|
|
|
clean:
|
|
|
|
-rm -f *.o core
|
|
|
|
|
|
|
|
clobber: clean
|
|
|
|
-rm -f *~ @* '#'* demo
|