blob: 9835c30ae2eb276d24dfe81c905ad199c4738c07 [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
Guido van Rossum3caad8c1995-03-28 09:22:53 +000013# Libraries (must be in this order!)
Guido van Rossum705d5171994-10-08 19:30:50 +000014MYLIBS= $(blddir)/Modules/libModules.a \
15 $(blddir)/Python/libPython.a \
16 $(blddir)/Objects/libObjects.a \
17 $(blddir)/Parser/libParser.a
Guido van Rossum3caad8c1995-03-28 09:22:53 +000018
19# XXX edit MODLIBS, LIBS and SYSLIBS to match $(blddir)/Modules/Makefile
Guido van Rossum705d5171994-10-08 19:30:50 +000020MODLIBS=
21LIBS=
22SYSLIBS= -lm
23ALLLIBS= $(MYLIBS) $(MODLIBS) $(LIBS) $(SYSLIBS)
24
25# Build the demo application
26all: demo
27demo: demo.o config.o
28 $(CC) demo.o config.o $(ALLLIBS) -o demo
29
30# Build config.o, suppressing the main() function
31config.o: $(blddir)/Modules/config.c
32 $(CC) $(CFLAGS) -DNO_MAIN -c $(blddir)/Modules/config.c
33
34# Administrative targets
35
36test: demo
37 ./demo
38
39clean:
40 -rm -f *.o core
41
42clobber: clean
43 -rm -f *~ @* '#'* demo