1997-07-19 17:58:50 -03:00
|
|
|
# Makefile for embedded Python use demo.
|
2000-07-10 11:35:12 -03:00
|
|
|
# (This version tailored for my Red Hat Linux 6.1 setup;
|
|
|
|
# edit lines marked with XXX.)
|
1994-10-08 16:30:50 -03:00
|
|
|
|
1997-07-19 17:58:50 -03:00
|
|
|
# XXX The compiler you are using
|
|
|
|
CC= gcc
|
|
|
|
|
|
|
|
# XXX Top of the build tree and source tree
|
2000-07-10 11:35:12 -03:00
|
|
|
blddir= ../../linux
|
1994-10-08 16:30:50 -03:00
|
|
|
srcdir= ../..
|
|
|
|
|
1997-07-19 17:58:50 -03:00
|
|
|
# Python version
|
2000-07-10 11:35:12 -03:00
|
|
|
VERSION= 2.0
|
1997-07-19 17:58:50 -03:00
|
|
|
|
1994-10-08 16:30:50 -03:00
|
|
|
# Compiler flags
|
|
|
|
OPT= -g
|
|
|
|
INCLUDES= -I$(srcdir)/Include -I$(blddir)
|
1997-07-19 17:58:50 -03:00
|
|
|
CFLAGS= $(OPT) $(INCLUDES)
|
1994-10-08 16:30:50 -03:00
|
|
|
|
1997-07-19 17:58:50 -03:00
|
|
|
# The Python library
|
2000-07-10 11:35:12 -03:00
|
|
|
LIBPYTHON= $(blddir)/libpython$(VERSION).a
|
1995-03-28 05:22:53 -04:00
|
|
|
|
1997-07-19 17:58:50 -03:00
|
|
|
# XXX edit LIBS (in particular) to match $(blddir)/Modules/Makefile
|
2000-07-10 11:35:12 -03:00
|
|
|
LIBS= -lnsl -ldl -lreadline -ltermcap -lieee -lpthread -lutil
|
2000-07-10 13:22:12 -03:00
|
|
|
LDFLAGS= -Xlinker -export-dynamic
|
1994-10-08 16:30:50 -03:00
|
|
|
SYSLIBS= -lm
|
1997-07-19 17:58:50 -03:00
|
|
|
MODLIBS=
|
|
|
|
ALLLIBS= $(LIBPYTHON) $(MODLIBS) $(LIBS) $(SYSLIBS)
|
1994-10-08 16:30:50 -03:00
|
|
|
|
|
|
|
# Build the demo application
|
|
|
|
all: demo
|
1997-07-19 17:58:50 -03:00
|
|
|
demo: demo.o
|
2000-07-10 13:22:12 -03:00
|
|
|
$(CC) $(LDFLAGS) demo.o $(ALLLIBS) -o demo
|
1994-10-08 16:30:50 -03:00
|
|
|
|
|
|
|
# Administrative targets
|
|
|
|
|
|
|
|
test: demo
|
|
|
|
./demo
|
|
|
|
|
|
|
|
clean:
|
|
|
|
-rm -f *.o core
|
|
|
|
|
|
|
|
clobber: clean
|
|
|
|
-rm -f *~ @* '#'* demo
|