0
0
mirror of https://github.com/python/cpython.git synced 2024-12-01 11:15:56 +01:00
cpython/Demo/embed/Makefile
Michael W. Hudson 0e21be71da Update version.
I wonder if there's a way to fix this Makefile to be slightly less
totally unreliable.
2005-06-15 11:46:27 +00:00

58 lines
1.1 KiB
Makefile

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