blob: d0aa769d43e5315a979c3056ff116b457a3b3c38 [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.
Guido van Rossuma88446a1997-07-19 21:34:11 +00003# Some details are specific for Solaris or CNRI.
Guido van Rossum5c8b9911997-07-19 21:00:47 +00004
Guido van Rossuma88446a1997-07-19 21:34:11 +00005# Which C compiler
Guido van Rossum5c8b9911997-07-19 21:00:47 +00006CC=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)
Guido van Rossuma88446a1997-07-19 21:34:11 +000017PYC=$(INST)/lib/$(PYVER)/config
Guido van Rossum5c8b9911997-07-19 21:00:47 +000018PYINCL=-I$(INST)/include/$(PYVER) -I$(PYC)
19PYLIBS=$(PYC)/libpython1.5.a
20
Guido van Rossum5c8b9911997-07-19 21:00:47 +000021# Libraries to link with -- very installation dependent
Guido van Rossuma88446a1997-07-19 21:34:11 +000022# (See LIBS= in Modules/Makefile in build tree)
23RLLIBS=-lreadline -ltermcap
Guido van Rossum5c8b9911997-07-19 21:00:47 +000024OTHERLIBS=-lsocket -lnsl -lpthread -ldl -lm
25
26# Compilation and link flags -- no need to change normally
27CFLAGS=$(PYINCL) $(OPT)
28LIBS=$(PYLIBS) $(RLLIBS) $(OTHERLIBS)
29
30# Default port for the pysvr application
31PORT=4000
32
33# Default target
34all: pysvr
35
36# Target to build pysvr
37pysvr: pysvr.o $(PYOBJS)
38 $(CC) pysvr.o $(LIBS) -o pysvr
39
40# Target to build and run pysvr
41run: pysvr
42 pysvr $(PORT)
43
44# Target to clean up the directory
45clean:
46 -rm -f pysvr *.o *~ core