home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / xwplascr.zip / XWPL0208.ZIP / src / startshut / makefile < prev    next >
Makefile  |  2002-01-14  |  4KB  |  116 lines

  1. #
  2. # makefile:
  3. #       makefile for src/main directory.
  4. #       For use with IBM NMAKE, which comes with the IBM compilers,
  5. #       the Developer's Toolkit, and the DDK.
  6. #
  7. #       All the makefiles have been restructured with V0.9.0.
  8. #
  9. #       Called from:    main makefile
  10. #
  11. #       Input:          ./*.c
  12. #
  13. #       Output:         ../bin/*.obj
  14. #
  15. #       Edit "setup.in" to set up the make process.
  16. #
  17.  
  18. # Say hello to yourself.
  19. !if [@echo +++++ Entering $(MAKEDIR)]
  20. !endif
  21.  
  22. # include setup (compiler options etc.)
  23. !include ..\..\setup.in
  24.  
  25. # FIXED MACROS
  26. # ------------
  27. #
  28. # You probably need not change the following.
  29. #
  30.  
  31. # Define the suffixes for files which NMAKE will work on.
  32. # .SUFFIXES is a reserved NMAKE keyword ("pseudotarget") for
  33. # defining file extensions that NMAKE will recognize.
  34. .SUFFIXES: .c .obj .dll .h .ih .rc .res
  35.  
  36. # OUTPUTDIR specifies the directory where all the output .OBJ
  37. # files will be created in. $(XWP_OUTPUT_ROOT) is set by
  38. # setup.in to point to \bin from the XWorkplace sources root,
  39. # but this can be modified by setting an external environment
  40. # variable. This approach has the advantage that
  41. # 1) all build files are in a common dir tree and the entire
  42. #    tree can be removed completely;
  43. # 2) the build tree can be on a different physical drive for
  44. #    speed.
  45. OUTPUTDIR = $(XWP_OUTPUT_ROOT)
  46. !if [@echo       OUTPUTDIR is $(OUTPUTDIR)]
  47. !endif
  48.  
  49. # The OBJS macro contains all the .OBJ files which need to be
  50. # created from the files in this directory.
  51. # These will be put into BIN\.
  52. # If you add a new source, add the corresponding .OBJ file here.
  53. !include ..\..\objects.in
  54. OBJS = $(XFLDR_OBJS_STARTSHUT)
  55.  
  56. # The main target:
  57. # If we're called from the main makefile, MAINMAKERUNNING is defined,
  58. # and we'll set $(OBJS) as our targets (which will go on).
  59. # Otherwise, we call the main makefile, which will again call ourselves later.
  60. all:   \
  61. !ifndef MAINMAKERUNNING
  62. # we're not being called from main makefile: start main makefile
  63.     callmainmake
  64.     @echo ----- Leaving $(MAKEDIR)
  65. !else
  66.     $(OBJS)
  67.     @echo ----- Leaving $(MAKEDIR)
  68. !endif
  69.  
  70. callmainmake:
  71.     @echo $(MAKEDIR)\makefile [$@]: Recursing to main makefile.
  72.     @cd ..\..
  73.     @nmake
  74.     @echo $(MAKEDIR)\makefile [$@]: Returned from main makefile. Done.
  75.  
  76. # The "dep" target: run fastdep on the sources.
  77. # "nmake dep" gets called from src\makefile if nmake dep
  78. # is running on the main makefile.
  79. dep:
  80.     $(RUN_FASTDEP) *.c
  81.     @echo ----- Leaving $(MAKEDIR)
  82.  
  83. # Now define inference rules for what to do with certain file
  84. # types, based on their file extension.
  85. # The syntax we need here is ".fromext.toext".
  86. # So whenever NMAKE encounters a .toext file, it
  87. # executes what we specify here.
  88. # The ugly {} brackets are some awkward syntax for specifying
  89. # files in other directories.
  90.  
  91. # Special macros used here: $(@B) is the current target w/out ext.
  92.  
  93. # -- compile C files to .OBJ files, using the CC macro above.
  94. #    The output will be placed in the directory specified by
  95. #    the OUTPUTDIR variable (set above).
  96.  
  97. .c.{$(OUTPUTDIR)}.obj:
  98.         @echo $(MAKEDIR)\makefile [$@]: Compiling $(@B).c
  99. !ifndef PRECH
  100. # precompiled headers disabled:
  101.         $(CC_DLL_MT) /Fo$(OUTPUTDIR)\$(@B).obj $(@B).c
  102. !else
  103.         $(CC_DLL_MT) /fi"$(PRECH)\$(@B).pch" /si"$(PRECH)\$(@B).pch" /Fo$(OUTPUTDIR)\$(@B).obj $(@B).c
  104. !endif
  105.  
  106. # The .OBJ-from-sources dependencies are now automatically
  107. # created by "nmake dep" into the .depend include file.
  108. # V0.9.12 (2001-05-22) [umoeller]
  109.  
  110. !ifndef NOINCLUDEDEPEND
  111. !include .depend
  112. !endif
  113.  
  114.  
  115.  
  116.