blob: 073cda5b65ad20063e709b2d06c61558007d0b4d [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 Rossum20abb4e1997-08-14 19:48:42 +00004# Also see ## comments for tailoring.
Guido van Rossum5c8b9911997-07-19 21:00:47 +00005
Guido van Rossuma88446a1997-07-19 21:34:11 +00006# Which C compiler
Guido van Rossum5c8b9911997-07-19 21:00:47 +00007CC=gcc
Guido van Rossum20abb4e1997-08-14 19:48:42 +00008##PURIFY=/usr/local/pure/purify
9LINKCC=$(PURIFY) $(CC)
Guido van Rossum5c8b9911997-07-19 21:00:47 +000010
11# Optimization preferences
12OPT=-g
13
14# Where Python is installed, and which version
15INST=/usr/local
16VER=1.5
17
18# Expressions using the above definitions -- no need to change
19PYVER=python$(VER)
Guido van Rossum20abb4e1997-08-14 19:48:42 +000020# Use these defs when compiling against installed Python
Guido van Rossuma88446a1997-07-19 21:34:11 +000021PYC=$(INST)/lib/$(PYVER)/config
Guido van Rossum5c8b9911997-07-19 21:00:47 +000022PYINCL=-I$(INST)/include/$(PYVER) -I$(PYC)
Guido van Rossum20abb4e1997-08-14 19:48:42 +000023PYLIBS=$(PYC)/lib$(PYVER).a
24# Use these defs when compiling against built Python
25##PYINCL=-I../../Include -I../../sparc
26##PYLIBS=../../sparc/lib$(PYVER).a
Guido van Rossum5c8b9911997-07-19 21:00:47 +000027
Guido van Rossum5c8b9911997-07-19 21:00:47 +000028# Libraries to link with -- very installation dependent
Guido van Rossuma88446a1997-07-19 21:34:11 +000029# (See LIBS= in Modules/Makefile in build tree)
30RLLIBS=-lreadline -ltermcap
Guido van Rossum5c8b9911997-07-19 21:00:47 +000031OTHERLIBS=-lsocket -lnsl -lpthread -ldl -lm
32
33# Compilation and link flags -- no need to change normally
34CFLAGS=$(PYINCL) $(OPT)
35LIBS=$(PYLIBS) $(RLLIBS) $(OTHERLIBS)
36
37# Default port for the pysvr application
38PORT=4000
39
40# Default target
41all: pysvr
42
43# Target to build pysvr
Guido van Rossum20abb4e1997-08-14 19:48:42 +000044pysvr: pysvr.o $(PYOBJS) $(PYLIBS)
45 $(LINKCC) pysvr.o $(LIBS) -o pysvr
Guido van Rossum5c8b9911997-07-19 21:00:47 +000046
47# Target to build and run pysvr
48run: pysvr
49 pysvr $(PORT)
50
51# Target to clean up the directory
52clean:
53 -rm -f pysvr *.o *~ core