cpython/Demo/embed/Makefile

58 lines
1.1 KiB
Makefile
Raw Normal View History

# Makefile for embedded Python use demo.
2000-07-10 14:35:12 +00:00
# (This version tailored for my Red Hat Linux 6.1 setup;
# edit lines marked with XXX.)
1994-10-08 19:30:50 +00:00
# XXX The compiler you are using
CC= gcc
# XXX Top of the build tree and source tree
blddir= ../..
1994-10-08 19:30:50 +00:00
srcdir= ../..
# Python version
VERSION= 2.3
1994-10-08 19:30:50 +00:00
# Compiler flags
OPT= -g
INCLUDES= -I$(srcdir)/Include -I$(blddir)
CFLAGS= $(OPT)
CPPFLAGS= $(INCLUDES)
1994-10-08 19:30:50 +00:00
# The Python library
2000-07-10 14:35:12 +00:00
LIBPYTHON= $(blddir)/libpython$(VERSION).a
# XXX edit LIBS (in particular) to match $(blddir)/Modules/Makefile
2000-07-10 14:35:12 +00:00
LIBS= -lnsl -ldl -lreadline -ltermcap -lieee -lpthread -lutil
LDFLAGS= -Xlinker -export-dynamic
1994-10-08 19:30:50 +00:00
SYSLIBS= -lm
MODLIBS=
ALLLIBS= $(LIBPYTHON) $(MODLIBS) $(LIBS) $(SYSLIBS)
1994-10-08 19:30:50 +00:00
# Build the demo applications
all: demo loop importexc
demo: demo.o
$(CC) $(LDFLAGS) demo.o $(ALLLIBS) -o demo
1994-10-08 19:30:50 +00:00
loop: loop.o
$(CC) $(LDFLAGS) loop.o $(ALLLIBS) -o loop
importexc: importexc.o
$(CC) $(LDFLAGS) importexc.o $(ALLLIBS) -o importexc
1994-10-08 19:30:50 +00:00
# Administrative targets
test: demo
./demo
COMMAND="print 'hello world'"
looptest: loop
./loop $(COMMAND)
1994-10-08 19:30:50 +00:00
clean:
-rm -f *.o core
clobber: clean
-rm -f *~ @* '#'* demo loop importexc
realclean: clobber