blob: 4adc2ceac66126b9c17dcb9a6c3751f927d20e97 [file] [log] [blame]
Guido van Rossum5c8b9911997-07-19 21:00:47 +00001# Makefile for 'pysvr' application embedding Python.
2# Tailored for Python 1.5a3 or later.
3# Some details are specific to Solaris or CNRI.
4
5# Which C compiler (only set because I don't have cc here)
6CC=gcc
7
8# Optimization preferences
9OPT=-g
10
11# Where Python is installed, and which version
12INST=/usr/local
13VER=1.5
14
15# Expressions using the above definitions -- no need to change
16PYVER=python$(VER)
17#PYC=$(INST)/lib/$(PYVER)/config
18PYC=../src/sparc
19PYINCL=-I$(INST)/include/$(PYVER) -I$(PYC)
20PYLIBS=$(PYC)/libpython1.5.a
21
22# Where GNU readline is installed
23RLINST=/depot/gnu/plat
24
25# Libraries to link with -- very installation dependent
26RLLIBS=-L$(RLINST)/lib -lreadline -ltermcap
27OTHERLIBS=-lsocket -lnsl -lpthread -ldl -lm
28
29# Compilation and link flags -- no need to change normally
30CFLAGS=$(PYINCL) $(OPT)
31LIBS=$(PYLIBS) $(RLLIBS) $(OTHERLIBS)
32
33# Default port for the pysvr application
34PORT=4000
35
36# Default target
37all: pysvr
38
39# Target to build pysvr
40pysvr: pysvr.o $(PYOBJS)
41 $(CC) pysvr.o $(LIBS) -o pysvr
42
43# Target to build and run pysvr
44run: pysvr
45 pysvr $(PORT)
46
47# Target to clean up the directory
48clean:
49 -rm -f pysvr *.o *~ core