summaryrefslogtreecommitdiff
path: root/Demo/embed/Makefile
blob: d63a9d4462111d63d058fbb5e44c9f1561806ba5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# 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)

# Libraries
# XXX edit MODLIBS, LIBS and SYSLIBS to match $(blddir)/Modules/Makefile
MYLIBS=		$(blddir)/Modules/libModules.a \
		$(blddir)/Python/libPython.a \
		$(blddir)/Objects/libObjects.a \
		$(blddir)/Parser/libParser.a
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