home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Source Code / C / Applications / Python 1.3 / source code / Nt / Modules / makefile.nt.mak < prev    next >
Encoding:
Makefile  |  1995-12-17  |  2.3 KB  |  77 lines  |  [TEXT/R*ch]

  1. # This makefile builds the binaries
  2. #
  3. # Almost all the code goes into Python.dll, with only a small amount in
  4. # Python.EXE.
  5. #
  6. # This makefile also builds socketmodule.dll
  7. #
  8. # When Python.dll is built, Pythondefs.lib is also built.  This file
  9. # contains references into the DLL, and must be distributed with Python.dll
  10. # for developers of extension modules.
  11. !include <..\make.nt.in>
  12.  
  13. OBJS=  arraymodule.obj mathmodule.obj md5module.obj md5c.obj \
  14.         posixmodule.obj parsermodule.obj regexmodule.obj regexpr.obj \
  15.         rotormodule.obj    stropmodule.obj structmodule.obj \
  16.         timemodule.obj
  17.  
  18. lcustom=$(guilibsdll)
  19.  
  20. XLIB=        Modules.lib
  21.  
  22. MYLIBS=        $(XLIB) \
  23.         ..\Python\Python.lib \
  24.         ..\Objects\Objects.lib \
  25.         ..\Parser\Parser.lib
  26.  
  27. all:        ..\Python.exe ..\Python.dll ..\socketmodule.dll
  28.  
  29. $(XLIB):    $(OBJS)
  30.         $(libmgr) -out:$(XLIB) $(OBJS)
  31.  
  32. ..\Python.exe : pythoncon.obj $(python_defs_lib)
  33.     $(linker) -out:$*.exe pythoncon.obj -subsystem:console $(ldebug) $(python_defs_lib) $(conlibs)
  34.  
  35. $(python_defs_lib) $(python_defs_exp): python.nt.def
  36.     $(implib) -out:$*.lib -machine:$(CPU) -def:python.nt.def
  37.  
  38. # Note we have specified a DLL entrypoint, to guarantee Python's init.
  39. # Currently not required to be specified, but will be if we move 
  40. # to multi-thread DLL.
  41. ..\Python.dll : $(python_defs_exp) dl.nt.obj config.nt.obj $(MYLIBS)
  42.     link -out:$*.dll -dll config.nt.obj dl.nt.obj $(python_defs_exp)\
  43.         -entry:_DllMainCRTStartup$(DLLENTRY) $(ldebug) $(MYLIBS) \
  44.          $(lcustom)
  45.  
  46. dl.nt.obj: $*.c
  47.         $(CC) $(cflags) $(cdebug) $(cinclude) $(pythonopts) $*.c
  48.  
  49. config.nt.obj:    $*.c
  50.         $(CC) $(cflags) $(cdebug) $(cinclude) $(pythonopts) /DNO_MAIN $*.c
  51.  
  52. pythoncon.obj: config.nt.c
  53.         $(CC) $(cflags) $(cdebug) $(cinclude) $(pythonopts) /Fopythoncon.obj /DNO_MODULES config.nt.c
  54.  
  55. #############
  56. # sockets DLL
  57.  
  58. ..\socketmodule.dll: socketmodule.obj ..\Python.dll
  59.     link -dll -out:$*.dll socketmodule.obj -implib:socketmodule.lib wsock32.lib -entry:_DllMainCRTStartup$(DLLENTRY) $(ldebug) /EXPORT:initsocket $(lcustom) $(python_defs_lib)
  60.  
  61. # Build as C++ module!
  62. socketmodule.obj: socketmodule.c
  63.     $(cc) $(cflags) $(ccustom) $(cdebug) $(cinclude) $(cpch) $(pythonopts) /DUSE_DL_IMPORT /Tp $*.c
  64.  
  65.  
  66.  
  67. .ignore:
  68.  
  69. clean :
  70.         del *.obj *.lib *~ *.vcw *.wsp ..\*.vcw ..\*.wsp *.pdb 2>nul
  71.  
  72. clobber: clean
  73.         del ..\python.dll ..\python.exe pythondefs.* 2>nul
  74.         cd..
  75.         del socketmodule.exp socketmodule.lib socketmodule.dll 2>nul
  76.         del *.pyc /s 2>nul
  77.