home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / pyos2bin.zip / Demo / pysvr / Makefile next >
Makefile  |  1997-08-14  |  1KB  |  54 lines

  1. # Makefile for 'pysvr' application embedding Python.
  2. # Tailored for Python 1.5a3 or later.
  3. # Some details are specific for Solaris or CNRI.
  4. # Also see ## comments for tailoring.
  5.  
  6. # Which C compiler
  7. CC=gcc
  8. ##PURIFY=/usr/local/pure/purify
  9. LINKCC=$(PURIFY) $(CC)
  10.  
  11. # Optimization preferences
  12. OPT=-g
  13.  
  14. # Where Python is installed, and which version
  15. INST=/usr/local
  16. VER=1.5
  17.  
  18. # Expressions using the above definitions -- no need to change
  19. PYVER=python$(VER)
  20. # Use these defs when compiling against installed Python
  21. PYC=$(INST)/lib/$(PYVER)/config
  22. PYINCL=-I$(INST)/include/$(PYVER) -I$(PYC)
  23. PYLIBS=$(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
  27.  
  28. # Libraries to link with -- very installation dependent
  29. # (See LIBS= in Modules/Makefile in build tree)
  30. RLLIBS=-lreadline -ltermcap
  31. OTHERLIBS=-lsocket -lnsl -lpthread -ldl -lm
  32.  
  33. # Compilation and link flags -- no need to change normally
  34. CFLAGS=$(PYINCL) $(OPT)
  35. LIBS=$(PYLIBS) $(RLLIBS) $(OTHERLIBS)
  36.  
  37. # Default port for the pysvr application
  38. PORT=4000
  39.  
  40. # Default target
  41. all: pysvr
  42.  
  43. # Target to build pysvr
  44. pysvr: pysvr.o $(PYOBJS) $(PYLIBS)
  45.     $(LINKCC) pysvr.o $(LIBS) -o pysvr
  46.  
  47. # Target to build and run pysvr
  48. run: pysvr
  49.     pysvr $(PORT)
  50.  
  51. # Target to clean up the directory
  52. clean:
  53.     -rm -f pysvr *.o *~ core
  54.