home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / pyth_os2.zip / python-1.0.2 / Demo / embed / Makefile < prev    next >
Makefile  |  1994-01-18  |  919b  |  43 lines

  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
  14. # XXX edit MODLIBS, LIBS and SYSLIBS to match $(blddir)/Modules/Makefile
  15. MYLIBS=        $(blddir)/Modules/libModules.a \
  16.         $(blddir)/Python/libPython.a \
  17.         $(blddir)/Objects/libObjects.a \
  18.         $(blddir)/Parser/libParser.a
  19. MODLIBS=    
  20. LIBS=        
  21. SYSLIBS=    -lm
  22. ALLLIBS=    $(MYLIBS) $(MODLIBS) $(LIBS) $(SYSLIBS)
  23.  
  24. # Build the demo application
  25. all:        demo
  26. demo:        demo.o config.o
  27.         $(CC) demo.o config.o $(ALLLIBS) -o demo
  28.  
  29. # Build config.o, suppressing the main() function
  30. config.o:    $(blddir)/Modules/config.c
  31.         $(CC) $(CFLAGS) -DNO_MAIN -c $(blddir)/Modules/config.c
  32.  
  33. # Administrative targets
  34.  
  35. test:        demo
  36.         ./demo
  37.  
  38. clean:
  39.         -rm -f *.o core
  40.  
  41. clobber:    clean
  42.         -rm -f *~ @* '#'* demo
  43.