annotate Demo/embed/Makefile @ 54294:dba767bc3155 legacy-trunk

remove mention of old ctypes version
author Benjamin Peterson <benjamin@python.org>
date Sat, 23 May 2009 20:59:09 +0000
parents 99a2ee4e3a05
children dbe7ae666ce2
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
5877
0534e54e8106 Updated the Makefile to work with the new build strategy.
Guido van Rossum <guido@python.org>
parents: 2601
diff changeset
1 # Makefile for embedded Python use demo.
13509
fa741988db17 Adapted for Python 2.0 under RH Linux.
Guido van Rossum <guido@python.org>
parents: 5877
diff changeset
2 # (This version tailored for my Red Hat Linux 6.1 setup;
fa741988db17 Adapted for Python 2.0 under RH Linux.
Guido van Rossum <guido@python.org>
parents: 5877
diff changeset
3 # edit lines marked with XXX.)
1964
78bf675df5e5 initial checkin
Guido van Rossum <guido@python.org>
parents:
diff changeset
4
5877
0534e54e8106 Updated the Makefile to work with the new build strategy.
Guido van Rossum <guido@python.org>
parents: 2601
diff changeset
5 # XXX The compiler you are using
0534e54e8106 Updated the Makefile to work with the new build strategy.
Guido van Rossum <guido@python.org>
parents: 2601
diff changeset
6 CC= gcc
0534e54e8106 Updated the Makefile to work with the new build strategy.
Guido van Rossum <guido@python.org>
parents: 2601
diff changeset
7
0534e54e8106 Updated the Makefile to work with the new build strategy.
Guido van Rossum <guido@python.org>
parents: 2601
diff changeset
8 # XXX Top of the build tree and source tree
16170
2c7df45496a6 Updates and changes:
Barry Warsaw <barry@python.org>
parents: 15797
diff changeset
9 blddir= ../..
1964
78bf675df5e5 initial checkin
Guido van Rossum <guido@python.org>
parents:
diff changeset
10 srcdir= ../..
78bf675df5e5 initial checkin
Guido van Rossum <guido@python.org>
parents:
diff changeset
11
5877
0534e54e8106 Updated the Makefile to work with the new build strategy.
Guido van Rossum <guido@python.org>
parents: 2601
diff changeset
12 # Python version
48279
99a2ee4e3a05 correct version
Benjamin Peterson <benjamin@python.org>
parents: 35083
diff changeset
13 VERSION= 2.6
5877
0534e54e8106 Updated the Makefile to work with the new build strategy.
Guido van Rossum <guido@python.org>
parents: 2601
diff changeset
14
1964
78bf675df5e5 initial checkin
Guido van Rossum <guido@python.org>
parents:
diff changeset
15 # Compiler flags
78bf675df5e5 initial checkin
Guido van Rossum <guido@python.org>
parents:
diff changeset
16 OPT= -g
78bf675df5e5 initial checkin
Guido van Rossum <guido@python.org>
parents:
diff changeset
17 INCLUDES= -I$(srcdir)/Include -I$(blddir)
18016
0d6f760b6ef1 Separate CFLAGS and CPPFLAGS. CFLAGS should not contain preprocessor
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents: 16709
diff changeset
18 CFLAGS= $(OPT)
0d6f760b6ef1 Separate CFLAGS and CPPFLAGS. CFLAGS should not contain preprocessor
Neil Schemenauer <nascheme@enme.ucalgary.ca>
parents: 16709
diff changeset
19 CPPFLAGS= $(INCLUDES)
5877
0534e54e8106 Updated the Makefile to work with the new build strategy.
Guido van Rossum <guido@python.org>
parents: 2601
diff changeset
20
0534e54e8106 Updated the Makefile to work with the new build strategy.
Guido van Rossum <guido@python.org>
parents: 2601
diff changeset
21 # The Python library
13509
fa741988db17 Adapted for Python 2.0 under RH Linux.
Guido van Rossum <guido@python.org>
parents: 5877
diff changeset
22 LIBPYTHON= $(blddir)/libpython$(VERSION).a
1964
78bf675df5e5 initial checkin
Guido van Rossum <guido@python.org>
parents:
diff changeset
23
5877
0534e54e8106 Updated the Makefile to work with the new build strategy.
Guido van Rossum <guido@python.org>
parents: 2601
diff changeset
24 # XXX edit LIBS (in particular) to match $(blddir)/Modules/Makefile
13509
fa741988db17 Adapted for Python 2.0 under RH Linux.
Guido van Rossum <guido@python.org>
parents: 5877
diff changeset
25 LIBS= -lnsl -ldl -lreadline -ltermcap -lieee -lpthread -lutil
13512
9a40f18f0561 Add linker flag -export-dynamic so symbols in libpython*.a are exported.
Guido van Rossum <guido@python.org>
parents: 13509
diff changeset
26 LDFLAGS= -Xlinker -export-dynamic
5877
0534e54e8106 Updated the Makefile to work with the new build strategy.
Guido van Rossum <guido@python.org>
parents: 2601
diff changeset
27 SYSLIBS= -lm
1964
78bf675df5e5 initial checkin
Guido van Rossum <guido@python.org>
parents:
diff changeset
28 MODLIBS=
5877
0534e54e8106 Updated the Makefile to work with the new build strategy.
Guido van Rossum <guido@python.org>
parents: 2601
diff changeset
29 ALLLIBS= $(LIBPYTHON) $(MODLIBS) $(LIBS) $(SYSLIBS)
1964
78bf675df5e5 initial checkin
Guido van Rossum <guido@python.org>
parents:
diff changeset
30
24379
e2d461befc7a - Make number in comment match the targets in that section of the
Fred Drake <fdrake@acm.org>
parents: 21005
diff changeset
31 # Build the demo applications
16709
1cf36eb5a25c import.c -> importexc.c
Barry Warsaw <barry@python.org>
parents: 16374
diff changeset
32 all: demo loop importexc
5877
0534e54e8106 Updated the Makefile to work with the new build strategy.
Guido van Rossum <guido@python.org>
parents: 2601
diff changeset
33 demo: demo.o
13512
9a40f18f0561 Add linker flag -export-dynamic so symbols in libpython*.a are exported.
Guido van Rossum <guido@python.org>
parents: 13509
diff changeset
34 $(CC) $(LDFLAGS) demo.o $(ALLLIBS) -o demo
1964
78bf675df5e5 initial checkin
Guido van Rossum <guido@python.org>
parents:
diff changeset
35
15797
edd19217b396 Add loop.c -- a test program for repeatedly calling Py_Initialize()
Guido van Rossum <guido@python.org>
parents: 13512
diff changeset
36 loop: loop.o
edd19217b396 Add loop.c -- a test program for repeatedly calling Py_Initialize()
Guido van Rossum <guido@python.org>
parents: 13512
diff changeset
37 $(CC) $(LDFLAGS) loop.o $(ALLLIBS) -o loop
edd19217b396 Add loop.c -- a test program for repeatedly calling Py_Initialize()
Guido van Rossum <guido@python.org>
parents: 13512
diff changeset
38
16709
1cf36eb5a25c import.c -> importexc.c
Barry Warsaw <barry@python.org>
parents: 16374
diff changeset
39 importexc: importexc.o
1cf36eb5a25c import.c -> importexc.c
Barry Warsaw <barry@python.org>
parents: 16374
diff changeset
40 $(CC) $(LDFLAGS) importexc.o $(ALLLIBS) -o importexc
16374
6325bd063f0a Add targets to make building `loop' and `import' easier. Useful for
Barry Warsaw <barry@python.org>
parents: 16170
diff changeset
41
1964
78bf675df5e5 initial checkin
Guido van Rossum <guido@python.org>
parents:
diff changeset
42 # Administrative targets
78bf675df5e5 initial checkin
Guido van Rossum <guido@python.org>
parents:
diff changeset
43
78bf675df5e5 initial checkin
Guido van Rossum <guido@python.org>
parents:
diff changeset
44 test: demo
78bf675df5e5 initial checkin
Guido van Rossum <guido@python.org>
parents:
diff changeset
45 ./demo
78bf675df5e5 initial checkin
Guido van Rossum <guido@python.org>
parents:
diff changeset
46
15797
edd19217b396 Add loop.c -- a test program for repeatedly calling Py_Initialize()
Guido van Rossum <guido@python.org>
parents: 13512
diff changeset
47 COMMAND="print 'hello world'"
edd19217b396 Add loop.c -- a test program for repeatedly calling Py_Initialize()
Guido van Rossum <guido@python.org>
parents: 13512
diff changeset
48 looptest: loop
edd19217b396 Add loop.c -- a test program for repeatedly calling Py_Initialize()
Guido van Rossum <guido@python.org>
parents: 13512
diff changeset
49 ./loop $(COMMAND)
edd19217b396 Add loop.c -- a test program for repeatedly calling Py_Initialize()
Guido van Rossum <guido@python.org>
parents: 13512
diff changeset
50
1964
78bf675df5e5 initial checkin
Guido van Rossum <guido@python.org>
parents:
diff changeset
51 clean:
78bf675df5e5 initial checkin
Guido van Rossum <guido@python.org>
parents:
diff changeset
52 -rm -f *.o core
78bf675df5e5 initial checkin
Guido van Rossum <guido@python.org>
parents:
diff changeset
53
78bf675df5e5 initial checkin
Guido van Rossum <guido@python.org>
parents:
diff changeset
54 clobber: clean
16709
1cf36eb5a25c import.c -> importexc.c
Barry Warsaw <barry@python.org>
parents: 16374
diff changeset
55 -rm -f *~ @* '#'* demo loop importexc
1cf36eb5a25c import.c -> importexc.c
Barry Warsaw <barry@python.org>
parents: 16374
diff changeset
56
1cf36eb5a25c import.c -> importexc.c
Barry Warsaw <barry@python.org>
parents: 16374
diff changeset
57 realclean: clobber