Last change
on this file was 391, checked in by dmik, 11 years ago |
python: Merge vendor 2.7.6 to trunk.
|
-
Property svn:eol-style
set to
native
|
File size:
1.1 KB
|
Rev | Line | |
---|
[2] | 1 | # Makefile for embedded Python use demo.
|
---|
[391] | 2 | # (This version originally written on Red Hat Linux 6.1;
|
---|
[2] | 3 | # edit lines marked with XXX.)
|
---|
| 4 |
|
---|
| 5 | # XXX The compiler you are using
|
---|
| 6 | CC= gcc
|
---|
| 7 |
|
---|
| 8 | # XXX Top of the build tree and source tree
|
---|
| 9 | blddir= ../..
|
---|
| 10 | srcdir= ../..
|
---|
| 11 |
|
---|
| 12 | # Python version
|
---|
[391] | 13 | VERSION= 2.7
|
---|
[2] | 14 |
|
---|
| 15 | # Compiler flags
|
---|
| 16 | OPT= -g
|
---|
| 17 | INCLUDES= -I$(srcdir)/Include -I$(blddir)
|
---|
| 18 | CFLAGS= $(OPT)
|
---|
| 19 | CPPFLAGS= $(INCLUDES)
|
---|
| 20 |
|
---|
| 21 | # The Python library
|
---|
| 22 | LIBPYTHON= $(blddir)/libpython$(VERSION).a
|
---|
| 23 |
|
---|
[391] | 24 | # XXX edit LIBS (in particular) to match $(blddir)/Makefile
|
---|
[2] | 25 | LIBS= -lnsl -ldl -lreadline -ltermcap -lieee -lpthread -lutil
|
---|
| 26 | LDFLAGS= -Xlinker -export-dynamic
|
---|
| 27 | SYSLIBS= -lm
|
---|
| 28 | MODLIBS=
|
---|
| 29 | ALLLIBS= $(LIBPYTHON) $(MODLIBS) $(LIBS) $(SYSLIBS)
|
---|
| 30 |
|
---|
| 31 | # Build the demo applications
|
---|
| 32 | all: demo loop importexc
|
---|
| 33 | demo: demo.o
|
---|
| 34 | $(CC) $(LDFLAGS) demo.o $(ALLLIBS) -o demo
|
---|
| 35 |
|
---|
| 36 | loop: loop.o
|
---|
| 37 | $(CC) $(LDFLAGS) loop.o $(ALLLIBS) -o loop
|
---|
| 38 |
|
---|
| 39 | importexc: importexc.o
|
---|
| 40 | $(CC) $(LDFLAGS) importexc.o $(ALLLIBS) -o importexc
|
---|
| 41 |
|
---|
| 42 | # Administrative targets
|
---|
| 43 |
|
---|
| 44 | test: demo
|
---|
| 45 | ./demo
|
---|
| 46 |
|
---|
| 47 | COMMAND="print 'hello world'"
|
---|
| 48 | looptest: loop
|
---|
| 49 | ./loop $(COMMAND)
|
---|
| 50 |
|
---|
| 51 | clean:
|
---|
| 52 | -rm -f *.o core
|
---|
| 53 |
|
---|
| 54 | clobber: clean
|
---|
| 55 | -rm -f *~ @* '#'* demo loop importexc
|
---|
| 56 |
|
---|
| 57 | realclean: clobber
|
---|
Note:
See
TracBrowser
for help on using the repository browser.