PageRenderTime 213ms CodeModel.GetById 121ms app.highlight 3ms RepoModel.GetById 88ms app.codeStats 0ms

/Demo/embed/Makefile

http://unladen-swallow.googlecode.com/
Makefile | 57 lines | 31 code | 15 blank | 11 comment | 0 complexity | 0609321cf9975996391746d2860b7748 MD5 | raw file
 1# Makefile for embedded Python use demo.
 2# (This version tailored for my Red Hat Linux 6.1 setup;
 3# edit lines marked with XXX.)
 4
 5# XXX The compiler you are using
 6CC=	 	gcc
 7
 8# XXX Top of the build tree and source tree
 9blddir=		../..
10srcdir=		../..
11
12# Python version
13VERSION=	2.6
14
15# Compiler flags
16OPT=		-g
17INCLUDES=	-I$(srcdir)/Include -I$(blddir)
18CFLAGS=		$(OPT)
19CPPFLAGS=	$(INCLUDES)
20
21# The Python library
22LIBPYTHON=	$(blddir)/libpython$(VERSION).a
23
24# XXX edit LIBS (in particular) to match $(blddir)/Modules/Makefile
25LIBS=		-lnsl -ldl -lreadline -ltermcap -lieee -lpthread -lutil
26LDFLAGS=	-Xlinker -export-dynamic
27SYSLIBS=	-lm
28MODLIBS=	
29ALLLIBS=	$(LIBPYTHON) $(MODLIBS) $(LIBS) $(SYSLIBS)
30
31# Build the demo applications
32all:		demo loop importexc
33demo:		demo.o
34		$(CC) $(LDFLAGS) demo.o $(ALLLIBS) -o demo
35
36loop:		loop.o
37		$(CC) $(LDFLAGS) loop.o $(ALLLIBS) -o loop
38
39importexc:	importexc.o
40		$(CC) $(LDFLAGS) importexc.o $(ALLLIBS) -o importexc
41
42# Administrative targets
43
44test:		demo
45		./demo
46
47COMMAND="print 'hello world'"
48looptest:	loop
49		./loop $(COMMAND)
50
51clean:
52		-rm -f *.o core
53
54clobber:	clean
55		-rm -f *~ @* '#'* demo loop importexc
56
57realclean:	clobber