Guido van Rossum | 5c8b991 | 1997-07-19 21:00:47 +0000 | [diff] [blame^] | 1 | # Makefile for 'pysvr' application embedding Python. |
| 2 | # Tailored for Python 1.5a3 or later. |
| 3 | # Some details are specific to Solaris or CNRI. |
| 4 | |
| 5 | # Which C compiler (only set because I don't have cc here) |
| 6 | CC=gcc |
| 7 | |
| 8 | # Optimization preferences |
| 9 | OPT=-g |
| 10 | |
| 11 | # Where Python is installed, and which version |
| 12 | INST=/usr/local |
| 13 | VER=1.5 |
| 14 | |
| 15 | # Expressions using the above definitions -- no need to change |
| 16 | PYVER=python$(VER) |
| 17 | #PYC=$(INST)/lib/$(PYVER)/config |
| 18 | PYC=../src/sparc |
| 19 | PYINCL=-I$(INST)/include/$(PYVER) -I$(PYC) |
| 20 | PYLIBS=$(PYC)/libpython1.5.a |
| 21 | |
| 22 | # Where GNU readline is installed |
| 23 | RLINST=/depot/gnu/plat |
| 24 | |
| 25 | # Libraries to link with -- very installation dependent |
| 26 | RLLIBS=-L$(RLINST)/lib -lreadline -ltermcap |
| 27 | OTHERLIBS=-lsocket -lnsl -lpthread -ldl -lm |
| 28 | |
| 29 | # Compilation and link flags -- no need to change normally |
| 30 | CFLAGS=$(PYINCL) $(OPT) |
| 31 | LIBS=$(PYLIBS) $(RLLIBS) $(OTHERLIBS) |
| 32 | |
| 33 | # Default port for the pysvr application |
| 34 | PORT=4000 |
| 35 | |
| 36 | # Default target |
| 37 | all: pysvr |
| 38 | |
| 39 | # Target to build pysvr |
| 40 | pysvr: pysvr.o $(PYOBJS) |
| 41 | $(CC) pysvr.o $(LIBS) -o pysvr |
| 42 | |
| 43 | # Target to build and run pysvr |
| 44 | run: pysvr |
| 45 | pysvr $(PORT) |
| 46 | |
| 47 | # Target to clean up the directory |
| 48 | clean: |
| 49 | -rm -f pysvr *.o *~ core |