blob: cb6605fa9ef92597642ffbef5ebffbf3effd7d27 [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
Guido van Rossum063ee7b2000-11-03 12:58:09 +000016VER=2.0
Guido van Rossum5c8b9911997-07-19 21:00:47 +000017
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 Rossum063ee7b2000-11-03 12:58:09 +000031OTHERLIBS=-lnsl -lpthread -ldl -lm -ldb -lutil
Guido van Rossum5c8b9911997-07-19 21:00:47 +000032
33# Compilation and link flags -- no need to change normally
Neil Schemenauer89e90d62001-06-02 06:16:02 +000034CFLAGS=$(OPT)
35CPPFLAGS=$(PYINCL)
Guido van Rossum5c8b9911997-07-19 21:00:47 +000036LIBS=$(PYLIBS) $(RLLIBS) $(OTHERLIBS)
37
38# Default port for the pysvr application
39PORT=4000
40
41# Default target
42all: pysvr
43
44# Target to build pysvr
Guido van Rossum20abb4e1997-08-14 19:48:42 +000045pysvr: pysvr.o $(PYOBJS) $(PYLIBS)
46 $(LINKCC) pysvr.o $(LIBS) -o pysvr
Guido van Rossum5c8b9911997-07-19 21:00:47 +000047
48# Target to build and run pysvr
49run: pysvr
50 pysvr $(PORT)
51
52# Target to clean up the directory
53clean:
54 -rm -f pysvr *.o *~ core