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