57 lines · 1.3 KB · Makefile
RawDownload
# Makefile for 'pysvr' application embedding Python.# Tailored for Python 1.5a3 or later.# Some details are specific for Solaris or CNRI.# Also see ## comments for tailoring. # Which C compilerCC=gcc##PURIFY=/usr/local/pure/purifyLINKCC=$(PURIFY) $(CC) # Optimization preferencesOPT=-g # Which Python version we're usingVER=2.2 # Expressions using the above definitionsPYVER=python$(VER) # Use these defs when compiling against installed Python##INST=/usr/local##PYC=$(INST)/lib/$(PYVER)/config##PYINCL=-I$(INST)/include/$(PYVER) -I$(PYC)##PYLIBS=$(PYC)/lib$(PYVER).a # Use these defs when compiling against built PythonPLAT=linuxPYINCL=-I../../Include -I../../$(PLAT)PYLIBS=../../$(PLAT)/lib$(PYVER).a # Libraries to link with -- very installation dependent# (See LIBS= in Modules/Makefile in build tree)RLLIBS=-lreadline -ltermcapOTHERLIBS=-lnsl -lpthread -ldl -lm -ldb -lutil # Compilation and link flags -- no need to change normallyCFLAGS=$(OPT)CPPFLAGS=$(PYINCL)LIBS=$(PYLIBS) $(RLLIBS) $(OTHERLIBS) # Default port for the pysvr applicationPORT=4000 # Default targetall: pysvr # Target to build pysvrpysvr: pysvr.o $(PYOBJS) $(PYLIBS)	$(LINKCC) pysvr.o $(LIBS) -o pysvr # Target to build and run pysvrrun: pysvr	pysvr $(PORT) # Target to clean up the directoryclean:	-rm -f pysvr *.o *~ core