borland.mak 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. !include ../../Makefile.inc
  2. #############################################################################
  3. # Lib Path
  4. LPATH=..\..\lib;..\..\lib\psdk
  5. # MFC Include directory base
  6. MFCINCL=..\include
  7. # BC Include directory
  8. BCINCL=..\..\include;..\..\include\atl
  9. BASE=W
  10. MODEL=U
  11. TARGDEFS=_UNICODE;UNICODE;WINSCP
  12. TARGDEFS=$(TARGDEFS);_MBCS;_MT=1;_X86_
  13. LFLAGS=$(LFLAGS) /j$(LPATH) /L$(LPATH)
  14. LFLAGS=$(LFLAGS) /w-
  15. #
  16. # Object File Directory
  17. #
  18. D=$$$(MODEL)$(BASE) # subdirectory specific to variant
  19. GOAL=$(MODEL)afxc$(BASE)
  20. #
  21. # COMPILER OPTIONS
  22. #
  23. # -VF4 Support MFC 4.0
  24. CL_OPT=-VF4 -w-
  25. DEFS=_declspec=__declspec;_WCHAR_T_DEFINED;__MSC;_ANONYMOUS_STRUCT;_MSC_VER=1200;_WINDOWS
  26. DEFS=$(DEFS)$(DEBDEFS);$(TARGDEFS)
  27. #############################################################################
  28. # Library Components
  29. OBJECT = except.obj
  30. FILES = filecore.obj filex.obj filest.obj
  31. MISC = strcore.obj strex.obj timecore.obj
  32. WINMISC = winstr.obj
  33. INLINES =
  34. CPP_OBJS=$(OBJECT) $(FILES) $(MISC) $(WINMISC)
  35. OBJS=$(CPP_OBJS)
  36. #############################################################################
  37. # Standard tools
  38. #############################################################################
  39. # Set CPPFLAGS for use with .cpp.obj and .c.obj rules
  40. # Define rule for use with OBJ directory
  41. CPPFLAGS=$(CFLAG_COMMON) $(CL_OPT) -D$(DEFS:;= -D)
  42. INCL=$(BCINCL);$(MFCINCL)
  43. BORFLAGS=$(CPPFLAGS) -I$(INCL:;= -I)
  44. .SUFFIXES: .cpp
  45. .path.obj = $(D)
  46. .cpp.obj:
  47. $(CC) $(BORFLAGS) -o $@ $<
  48. #############################################################################
  49. # Goals to build
  50. LIB=$(LIB_PATH)\$(GOAL).lib
  51. GOALS=log.mode create.dir $(LIB)
  52. goal: $(GOALS)
  53. log.mode:
  54. @-echo BORLAND.MAK:
  55. @-echo GOAL=$(GOAL),
  56. @-echo CL_OPT=$(CL_OPT)
  57. @-echo DEFS=$(DEFS),
  58. @-echo CPPFLAGS=$(CPPFLAGS)
  59. @-echo D=$(D)
  60. create.dir:
  61. @-if not exist $(D) mkdir $(D)
  62. @-if not exist $(LIB_PATH) mkdir $(LIB_PATH)
  63. clean:
  64. @-if exist *.map erase *.map
  65. @-if exist *.dll erase *.dll
  66. @-if exist *.cfg erase *.cfg
  67. @-if exist *.rsp erase *.rsp
  68. @-if exist *.tds erase *.tds
  69. @-if exist $$DLLD.W rmdir $$DLLD.W /s
  70. @-if exist $$DLL.W rmdir $$DLL.W /s
  71. @-if exist $$NW rmdir $$NW /s
  72. @-if exist $$NWD rmdir $$NWD /s
  73. #############################################################################
  74. # Build the library from the up-to-date objs
  75. # Build final library
  76. $(LIB): $(OBJS)
  77. $(MKLIB) $@ $(**)
  78. #############################################################################