home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Source Code / C / Applications / Python 1.3 / source code / Demo / embed / Makefile < prev    next >
Encoding:
Makefile  |  1995-12-17  |  945 b   |  44 lines  |  [TEXT/R*ch]

  1. # Makefile for embedded Python use demo
  2.  
  3. # Top of the build tree and source tree
  4. blddir=        ../..
  5. srcdir=        ../..
  6.  
  7. # Compiler flags
  8. OPT=        -g
  9. INCLUDES=    -I$(srcdir)/Include -I$(blddir)
  10. DEFINES=    -DHAVE_CONFIG_H
  11. CFLAGS=        $(OPT) $(DEFINES) $(INCLUDES)
  12.  
  13. # Libraries (must be in this order!)
  14. MYLIBS=        $(blddir)/Modules/libModules.a \
  15.         $(blddir)/Python/libPython.a \
  16.         $(blddir)/Objects/libObjects.a \
  17.         $(blddir)/Parser/libParser.a
  18.  
  19. # XXX edit MODLIBS, LIBS and SYSLIBS to match $(blddir)/Modules/Makefile
  20. MODLIBS=    
  21. LIBS=        
  22. SYSLIBS=    -lm
  23. ALLLIBS=    $(MYLIBS) $(MODLIBS) $(LIBS) $(SYSLIBS)
  24.  
  25. # Build the demo application
  26. all:        demo
  27. demo:        demo.o config.o
  28.         $(CC) demo.o config.o $(ALLLIBS) -o demo
  29.  
  30. # Build config.o, suppressing the main() function
  31. config.o:    $(blddir)/Modules/config.c
  32.         $(CC) $(CFLAGS) -DNO_MAIN -c $(blddir)/Modules/config.c
  33.  
  34. # Administrative targets
  35.  
  36. test:        demo
  37.         ./demo
  38.  
  39. clean:
  40.         -rm -f *.o core
  41.  
  42. clobber:    clean
  43.         -rm -f *~ @* '#'* demo
  44.