bfcisapi.mak 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196
  1. PLATFORM=INTEL
  2. PROCESSOR_ARCHITECTURE=x86
  3. # Default to DEBUG mode
  4. !ifndef DEBUG
  5. DEBUG=1
  6. !endif
  7. # Default to NOT DLL
  8. !ifndef DLL
  9. DLL=0
  10. !endif
  11. # BROWSEONLY is default 0 and implies BROWSE=1 if BROWSEONLY=1
  12. !ifndef BROWSEONLY
  13. BROWSEONLY=0
  14. !endif
  15. !if "$(BROWSEONLY)" != "0"
  16. !undef BROWSE
  17. BROWSE=1
  18. !endif
  19. # Default to no BROWSE info
  20. !ifndef BROWSE
  21. BROWSE=0
  22. !endif
  23. # Default to no _MBCS build
  24. MBCS=0
  25. # Default to multithreading support
  26. !ifndef MT
  27. MT=1
  28. !endif
  29. !if "$(MT)" != "1"
  30. !error This library must be built with threadding enabled.
  31. !endif
  32. # Lib directory
  33. !ifndef LIBDIR
  34. LIBDIR=..\LIB\BORLAND
  35. !endif
  36. # TYPE = Library Type Designator
  37. # N = normal C library
  38. # D = for use with MFC USRDLL library
  39. # E = for use with MFC Extension DLL library
  40. !if "$(DLL)" == "0"
  41. TYPE=N
  42. !if "$(DEBUG)" == "1"
  43. TARGOPTS=$(TARGOPTS) -v
  44. !endif
  45. !endif
  46. !if "$(DLL)" == "1"
  47. !error The _USRDLL configuration is not supported by this library.
  48. !endif
  49. !if "$(DLL)" == "2"
  50. !if "$(DEBUG)" == "1"
  51. TARGOPTS=$(TARGOPTS) -v
  52. !endif
  53. TARGDEFS=$(TARGDEFS) /D_WINDLL /D_AFXDLL /D_DLL /D_AFX_CORE_IMPL
  54. TYPE=E
  55. !endif
  56. #############################################################################
  57. # Parse options
  58. #
  59. # DEBUG OPTIONS
  60. #
  61. !if "$(DEBUG)" != "0"
  62. DEBUGSUF=D
  63. DEBDEFS=/D_DEBUG
  64. DEBOPTS=-Od
  65. !endif
  66. #
  67. # NON-DEBUG OPTIONS
  68. #
  69. !if "$(DEBUG)" == "0"
  70. DEBUGSUF=
  71. DEBDEFS=
  72. DEBOPTS=-O1
  73. !endif
  74. #
  75. # PLATFORM options
  76. #
  77. CPP=bcc32
  78. LIB32=tlib
  79. !ifndef LINK32
  80. LINK32=tlink32
  81. !endif
  82. CL_MODEL=/D_X86_
  83. MODEL=IS
  84. #
  85. # Object File Directory
  86. #
  87. !if "$(OBJ)" == ""
  88. D=$$$(TYPE)$(MODEL)$(DEBUGSUF) # subdirectory specific to variant
  89. !else
  90. D=$(OBJ) # User specified directory
  91. !endif
  92. GOAL=$(TYPE)AFX$(MODEL)$(DEBUGSUF)
  93. #
  94. # COMPILER OPTIONS
  95. #
  96. !if "$(PLATFORM)" == "INTEL"
  97. CL_OPT=-w- -X -VF4 -n$(D) $(DEBOPTS) $(TARGOPTS)
  98. !endif
  99. !if "$(BROWSE)" != "0"
  100. CL_OPT=-R $(CL_OPT)
  101. !endif
  102. DEFS=$(DEFS) $(DEBDEFS) $(TARGDEFS)
  103. #############################################################################
  104. # Library Components
  105. OBJS=isapi.obj inetcall.obj
  106. #############################################################################
  107. # Standard tools
  108. #############################################################################
  109. # Set CPPFLAGS for use with .cpp.obj and .c.obj rules
  110. # Define rule for use with OBJ directory
  111. # C++ uses a PCH file
  112. CPPFLAGS=$(CPPFLAGS) $(CL_MODEL) $(CL_OPT) $(DEFS) $(OPT)
  113. PCH_FILE=
  114. .SUFFIXES: .cpp
  115. .path.obj = $(D)
  116. .cpp.obj:
  117. $(CC) @&&~
  118. $(CPPFLAGS) -c $<
  119. ~
  120. #############################################################################
  121. # Goals to build
  122. GOALS=create.dir
  123. GOALS=$(GOALS) $(LIBDIR)\$(GOAL).lib
  124. goal: $(GOALS)
  125. create.dir:
  126. @-if not exist $(D)\*.* mkdir $(D)
  127. @-if not exist $(LIBDIR) mkdir $(LIBDIR)
  128. clean:
  129. -if exist $(D)\*.obj erase $(D)\*.obj
  130. -if exist $(D)\*.pch erase $(D)\*.pch
  131. -if exist $(D)\*.res erase $(D)\*.res
  132. -if exist $(D)\*.rsc erase $(D)\*.rsc
  133. -if exist $(D)\*.map erase $(D)\*.map
  134. -if exist $(D)\*.* rmdir $(D)
  135. -if exist ..\lib\$(GOAL).pdb del ..\lib\$(GOAL).pdb
  136. #############################################################################
  137. # Build the library from the up-to-date objs
  138. # Build final library
  139. !if "$(DLL)" != "2"
  140. # Build final library
  141. $(LIBDIR)\$(GOAL).lib: $(OBJS)
  142. @-if exist $@ erase $@
  143. @tlib $@ /P2048 @&&!
  144. +$(**: = &^
  145. +)
  146. !
  147. !else
  148. !error No DLL Version of ISAPI Libraries supported
  149. !endif #DLL!=2
  150. #############################################################################