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.)
5 # XXX The compiler you are using
8 # XXX Top of the build tree and source tree
17 INCLUDES
= -I
$(srcdir)/Include
-I
$(blddir
)
22 LIBPYTHON
= $(blddir
)/libpython
$(VERSION
).a
24 # XXX edit LIBS (in particular) to match $(blddir)/Modules/Makefile
25 LIBS
= -lnsl
-ldl
-lreadline
-ltermcap
-lieee
-lpthread
-lutil
26 LDFLAGS
= -Xlinker
-export-dynamic
29 ALLLIBS
= $(LIBPYTHON
) $(MODLIBS
) $(LIBS
) $(SYSLIBS
)
31 # Build the demo applications
32 all: demo loop importexc
34 $(CC
) $(LDFLAGS
) demo.o
$(ALLLIBS
) -o demo
37 $(CC
) $(LDFLAGS
) loop.o
$(ALLLIBS
) -o loop
39 importexc
: importexc.o
40 $(CC
) $(LDFLAGS
) importexc.o
$(ALLLIBS
) -o importexc
42 # Administrative targets
47 COMMAND
="print 'hello world'"
55 -rm -f
*~ @
* '#'* demo loop importexc