1994-10-08 19:30:50 +00:00
|
|
|
# Makefile for embedded Python use demo
|
|
|
|
|
|
|
|
# Top of the build tree and source tree
|
|
|
|
blddir= ../..
|
|
|
|
srcdir= ../..
|
|
|
|
|
|
|
|
# Compiler flags
|
|
|
|
OPT= -g
|
|
|
|
INCLUDES= -I$(srcdir)/Include -I$(blddir)
|
|
|
|
DEFINES= -DHAVE_CONFIG_H
|
|
|
|
CFLAGS= $(OPT) $(DEFINES) $(INCLUDES)
|
|
|
|
|
1995-03-28 09:22:53 +00:00
|
|
|
# Libraries (must be in this order!)
|
1994-10-08 19:30:50 +00:00
|
|
|
MYLIBS= $(blddir)/Modules/libModules.a \
|
|
|
|
$(blddir)/Python/libPython.a \
|
|
|
|
$(blddir)/Objects/libObjects.a \
|
|
|
|
$(blddir)/Parser/libParser.a
|
1995-03-28 09:22:53 +00:00
|
|
|
|
|
|
|
# XXX edit MODLIBS, LIBS and SYSLIBS to match $(blddir)/Modules/Makefile
|
1994-10-08 19:30:50 +00:00
|
|
|
MODLIBS=
|
|
|
|
LIBS=
|
|
|
|
SYSLIBS= -lm
|
|
|
|
ALLLIBS= $(MYLIBS) $(MODLIBS) $(LIBS) $(SYSLIBS)
|
|
|
|
|
|
|
|
# Build the demo application
|
|
|
|
all: demo
|
|
|
|
demo: demo.o config.o
|
|
|
|
$(CC) demo.o config.o $(ALLLIBS) -o demo
|
|
|
|
|
|
|
|
# Build config.o, suppressing the main() function
|
|
|
|
config.o: $(blddir)/Modules/config.c
|
|
|
|
$(CC) $(CFLAGS) -DNO_MAIN -c $(blddir)/Modules/config.c
|
|
|
|
|
|
|
|
# Administrative targets
|
|
|
|
|
|
|
|
test: demo
|
|
|
|
./demo
|
|
|
|
|
|
|
|
clean:
|
|
|
|
-rm -f *.o core
|
|
|
|
|
|
|
|
clobber: clean
|
|
|
|
-rm -f *~ @* '#'* demo
|