Makefile 827 Bytes
Newer Older
1 2
# Makefile for embedded Python use demo.
# (This version tailored for CNRI and Solaris; edit lines marked with XXX.)
Guido van Rossum's avatar
Guido van Rossum committed
3

4 5 6 7
# XXX The compiler you are using
CC=	 	gcc

# XXX Top of the build tree and source tree
Guido van Rossum's avatar
Guido van Rossum committed
8 9 10
blddir=		../..
srcdir=		../..

11 12 13
# Python version
VERSION=	1.5

Guido van Rossum's avatar
Guido van Rossum committed
14 15 16
# Compiler flags
OPT=		-g
INCLUDES=	-I$(srcdir)/Include -I$(blddir)
17
CFLAGS=		$(OPT) $(INCLUDES)
Guido van Rossum's avatar
Guido van Rossum committed
18

19 20
# The Python library
LIBPYTHON=		$(blddir)/libpython$(VERSION).a
21

22 23
# XXX edit LIBS (in particular) to match $(blddir)/Modules/Makefile
LIBS=		-lsocket -lnsl -ldl  -lreadline -ltermcap
Guido van Rossum's avatar
Guido van Rossum committed
24
SYSLIBS=	-lm
25 26
MODLIBS=	
ALLLIBS=	$(LIBPYTHON) $(MODLIBS) $(LIBS) $(SYSLIBS)
Guido van Rossum's avatar
Guido van Rossum committed
27 28 29

# Build the demo application
all:		demo
30 31
demo:		demo.o
		$(CC) demo.o $(ALLLIBS) -o demo
Guido van Rossum's avatar
Guido van Rossum committed
32 33 34 35 36 37 38 39 40 41 42

# Administrative targets

test:		demo
		./demo

clean:
		-rm -f *.o core

clobber:	clean
		-rm -f *~ @* '#'* demo