Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

175 lines
4.2 KiB

  1. #=------------------------------------------------------------------------=
  2. # MakeLib.Inc
  3. #=------------------------------------------------------------------------=
  4. # Copyright 1995 Microsoft Corporation. All Rights Reserved.
  5. #
  6. # THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
  7. # ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
  8. # THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
  9. # PARTICULAR PURPOSE.
  10. #=--------------------------------------------------------------------------=
  11. #
  12. # builds a library. Assumes existence of $(TARGET) and $(OBJS)
  13. # (TARGET is the base name of the library, i.e. datad)
  14. #
  15. #
  16. # targets
  17. #
  18. !if "$(FRAMEWRKDIR)" == ""
  19. ! if "$(MDAC_BUILD)" != ""
  20. FRAMEWRKDIR=..\..\..
  21. ! else
  22. FRAMEWRKDIR=..\..
  23. ! endif
  24. !endif
  25. # Tools
  26. #
  27. !include "Tools.Inc"
  28. !if "$(MDAC_BUILD)" != ""
  29. SRCDIR=\foxde\framewrk
  30. !else
  31. SRCDIR=..
  32. !endif
  33. TARGETLIB=$(TARGET).lib
  34. !if "$(VC4_BUILD)" != ""
  35. _CFLAGS=$(_CFLAGS) -DVC4_BUILD=1
  36. !endif
  37. # build specific flags
  38. #
  39. !if "$(ASDEBUG)"!=""
  40. #
  41. # debug
  42. #
  43. !if "$(MDAC_BUILD)" != ""
  44. CFLAGS=-Zil -DDEBUG -D_DEBUG -DSTRICT -Od -DMDAC_BUILD -FI$(FRAMEWRKDIR)\include\vc41warn.h
  45. !else
  46. CFLAGS=-Zil -DDEBUG -Od -FI$(FRAMEWRKDIR)\include\vc41warn.h
  47. !endif
  48. !if "$(PROCESSOR_ARCHITECTURE)"=="ALPHA"
  49. CFLAGS=$(CFLAGS) -QAieee
  50. !endif
  51. RCFLAGS=-dDEBUG
  52. !else if "$(ASICECAP)"!=""
  53. #
  54. # ICECap
  55. #
  56. !if "$(MDAC_BUILD)" != ""
  57. CFLAGS=-Gh -Zil -Owxsb1 -DICECAP -DNDEBUG -DSTRICT -DMDAC_BUILD -FI$(FRAMEWRKDIR)\include\vc41warn.h
  58. !else
  59. CFLAGS=-Gh -Zil -Owxsb1 -DICECAP -FI$(FRAMEWRKDIR)\include\vc41warn.h
  60. !endif
  61. !else
  62. #
  63. # Release
  64. #
  65. !if "$(MDAC_BUILD)" != ""
  66. CFLAGS=-Zil -Owxsb1 -DNDEBUG -DSTRICT -DMDAC_BUILD -FI$(FRAMEWRKDIR)\include\vc41warn.h
  67. !else
  68. CFLAGS=-Zil -Owxsb1 -FI$(FRAMEWRKDIR)\include\vc41warn.h
  69. !endif
  70. !if "$(PROCESSOR_ARCHITECTURE)"=="ALPHA"
  71. CFLAGS=$(CFLAGS) -QAl -QAieee
  72. !endif
  73. !endif
  74. #
  75. # The CTLSBROWSE or CTLS_BROWSE environment variable turns on/off the compilation of a
  76. # browse file when the object is compiled. Set CTLSBROWSE or CTLS_BROWSE to something
  77. # if you wish a browse file generated.
  78. !if "$(CTLSBROWSE)" != ""
  79. CTLS_BROWSE=1
  80. !endif
  81. !if "$(CTLS_BROWSE)"!=""
  82. CFLAGS=$(CFLAGS) /FR
  83. BSCMAKE=bscmake.exe
  84. !endif
  85. #
  86. # If we have precompiled headers, add the pch file to
  87. # the list of objects and to the compiler flags
  88. #
  89. !if "$(PCHFILE)"!=""
  90. OBJS=$(OBJS) pch.obj
  91. PCHFLAGS=-Yu$(PCHFILE)
  92. !endif
  93. #
  94. # default flags
  95. # CONSIDER: Will every library always want CV info?
  96. #
  97. INCPATH=-I. -I$(SRCDIR) -I$(FRAMEWRKDIR)\Include $(_INCPATH)
  98. !ifdef RISC_BLD
  99. LIBFLAGS=$(LIBFLAGS) $(_LIBFLAGS) -debugtype:cv -nologo -out:$(TARGETLIB) -subsystem:windows,4.00 -nodefaultlib -machine:$(PROCESSOR_ARCHITECTURE)
  100. CFLAGS=-nologo -c $(INCPATH) -Gd -Gs -Gy -W3 -WX -Oi $(CFLAGS) $(_CFLAGS) -Tp
  101. !else
  102. LIBFLAGS=$(LIBFLAGS) $(_LIBFLAGS) -debugtype:cv -nologo -out:$(TARGETLIB) -subsystem:windows,4.00 -nodefaultlib -machine:ix86
  103. CFLAGS=-nologo -c $(INCPATH) -QIfdiv- -Gd -Gs -Gy -W3 -WX -Oi $(CFLAGS) $(_CFLAGS) -Tp
  104. !endif
  105. !if "$(PCHFILE)" == ""
  106. all: $(MORETARGETS) $(TARGETLIB)
  107. !else
  108. all: pch.pch $(MORETARGETS) $(TARGETLIB)
  109. !endif
  110. $(TARGETLIB): $(OBJS) $(SRCDIR)\Makefile
  111. $(LIBRARIAN) $(OBJS) $(LIBFLAGS)
  112. !if "$(DATABROWSE)"!=""
  113. $(BSCMAKE) /o $(TARGET).bsc /S (windows.h ole2.h) *.sbr
  114. !endif
  115. # Precompiled header build rules
  116. #
  117. !if "$(PCHFILE)"!=""
  118. # pre-compiled header targets.
  119. pch.cpp:
  120. echo #include "$(PCHFILE)" > pch.cpp
  121. pch.pch pch.obj: $(SRCDIR)\$(PCHFILE) pch.cpp
  122. $(CC) -Yc$(PCHFILE) $(CFLAGS) pch.cpp
  123. !endif
  124. # Standard build rules.
  125. # If a .CPP, .C or .ODL file can't
  126. # be found in the other dependencies then it defaults to one of the following build rules
  127. #
  128. {$(SRCDIR)}.cpp.obj:
  129. $(CC) $(PCHFLAGS) $(CFLAGS) $<
  130. {$(SRCDIR)}.c.obj:
  131. $(CC) $(PCHFLAGS) $(CFLAGS) $<
  132. Clean:
  133. del *.obj
  134. del *.dll
  135. del *.pdb
  136. del *.vcp
  137. !if "$(PCHFILE)"==""
  138. Dep: $(MORETARGETS)
  139. echo Generating Dependencies for $(SERVERNAME)
  140. $(INCLUDES) $(INCPATH) -d $(SRCDIR)\*.c* > dep.mak
  141. !else
  142. Dep: pch.pch $(MORETARGETS)
  143. echo Generating Dependencies for $(SERVERNAME)
  144. $(INCLUDES) $(INCPATH) -d -r$(PCHFILE)=pch.pch $(SRCDIR)\*.c* > dep.mak
  145. !endif
  146. #=----------------------------=
  147. # Include Dependency Makefile
  148. #
  149. !IF EXIST(dep.mak)
  150. !include dep.mak
  151. !ENDIF