summaryrefslogtreecommitdiffstats
path: root/Demo/pysvr/Makefile
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1997-07-19 21:00:47 (GMT)
committerGuido van Rossum <guido@python.org>1997-07-19 21:00:47 (GMT)
commit5c8b9911750565713cba39fd8835cc951ddf2adf (patch)
treef161359096a8e5a11630f55d6091e5bad8a44680 /Demo/pysvr/Makefile
parent6e614e3d2a94abb329e727ca41bbf4fbba268701 (diff)
downloadcpython-5c8b9911750565713cba39fd8835cc951ddf2adf.zip
cpython-5c8b9911750565713cba39fd8835cc951ddf2adf.tar.gz
cpython-5c8b9911750565713cba39fd8835cc951ddf2adf.tar.bz2
New example of threaded embedding
Diffstat (limited to 'Demo/pysvr/Makefile')
-rw-r--r--Demo/pysvr/Makefile49
1 files changed, 49 insertions, 0 deletions
diff --git a/Demo/pysvr/Makefile b/Demo/pysvr/Makefile
new file mode 100644
index 0000000..4adc2ce
--- /dev/null
+++ b/Demo/pysvr/Makefile
@@ -0,0 +1,49 @@
+# Makefile for 'pysvr' application embedding Python.
+# Tailored for Python 1.5a3 or later.
+# Some details are specific to Solaris or CNRI.
+
+# Which C compiler (only set because I don't have cc here)
+CC=gcc
+
+# Optimization preferences
+OPT=-g
+
+# Where Python is installed, and which version
+INST=/usr/local
+VER=1.5
+
+# Expressions using the above definitions -- no need to change
+PYVER=python$(VER)
+#PYC=$(INST)/lib/$(PYVER)/config
+PYC=../src/sparc
+PYINCL=-I$(INST)/include/$(PYVER) -I$(PYC)
+PYLIBS=$(PYC)/libpython1.5.a
+
+# Where GNU readline is installed
+RLINST=/depot/gnu/plat
+
+# Libraries to link with -- very installation dependent
+RLLIBS=-L$(RLINST)/lib -lreadline -ltermcap
+OTHERLIBS=-lsocket -lnsl -lpthread -ldl -lm
+
+# Compilation and link flags -- no need to change normally
+CFLAGS=$(PYINCL) $(OPT)
+LIBS=$(PYLIBS) $(RLLIBS) $(OTHERLIBS)
+
+# Default port for the pysvr application
+PORT=4000
+
+# Default target
+all: pysvr
+
+# Target to build pysvr
+pysvr: pysvr.o $(PYOBJS)
+ $(CC) pysvr.o $(LIBS) -o pysvr
+
+# Target to build and run pysvr
+run: pysvr
+ pysvr $(PORT)
+
+# Target to clean up the directory
+clean:
+ -rm -f pysvr *.o *~ core