blob: d63a9d4462111d63d058fbb5e44c9f1561806ba5 [file] [log] [blame]
Guido van Rossum705d5171994-10-08 19:30:50 +00001# Makefile for embedded Python use demo
2
3# Top of the build tree and source tree
4blddir= ../..
5srcdir= ../..
6
7# Compiler flags
8OPT= -g
9INCLUDES= -I$(srcdir)/Include -I$(blddir)
10DEFINES= -DHAVE_CONFIG_H
11CFLAGS= $(OPT) $(DEFINES) $(INCLUDES)
12
13# Libraries
14# XXX edit MODLIBS, LIBS and SYSLIBS to match $(blddir)/Modules/Makefile
15MYLIBS= $(blddir)/Modules/libModules.a \
16 $(blddir)/Python/libPython.a \
17 $(blddir)/Objects/libObjects.a \
18 $(blddir)/Parser/libParser.a
19MODLIBS=
20LIBS=
21SYSLIBS= -lm
22ALLLIBS= $(MYLIBS) $(MODLIBS) $(LIBS) $(SYSLIBS)
23
24# Build the demo application
25all: demo
26demo: demo.o config.o
27 $(CC) demo.o config.o $(ALLLIBS) -o demo
28
29# Build config.o, suppressing the main() function
30config.o: $(blddir)/Modules/config.c
31 $(CC) $(CFLAGS) -DNO_MAIN -c $(blddir)/Modules/config.c
32
33# Administrative targets
34
35test: demo
36 ./demo
37
38clean:
39 -rm -f *.o core
40
41clobber: clean
42 -rm -f *~ @* '#'* demo