borland.mak 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. !include ../../Makefile.inc
  2. #############################################################################
  3. INCL=..\include
  4. BASE=W
  5. MODEL=U
  6. DEFS=_UNICODE;UNICODE;WINSCP;_WINDOWS
  7. #
  8. # Object File Directory
  9. #
  10. D=$$$(MODEL)$(BASE) # subdirectory specific to variant
  11. GOAL=$(MODEL)afxc$(BASE)
  12. #
  13. # COMPILER OPTIONS
  14. #
  15. WARNINGS=-Wno-extra-tokens -Wno-extern-initializer -Wno-varargs
  16. CL_OPT=$(WARNINGS)
  17. #############################################################################
  18. # Library Components
  19. FILES = filecore.obj filex.obj filest.obj
  20. MISC = strcore.obj strex.obj timecore.obj
  21. WINMISC = winstr.obj
  22. CPP_OBJS=$(FILES) $(MISC) $(WINMISC)
  23. OBJS=$(CPP_OBJS)
  24. #############################################################################
  25. # Standard tools
  26. #############################################################################
  27. # Set CPPFLAGS for use with .cpp.obj and .c.obj rules
  28. # Define rule for use with OBJ directory
  29. CPPFLAGS=$(CFLAG_CPP) $(CL_OPT) -D$(DEFS:;= -D)
  30. BORFLAGS=$(CPPFLAGS) -I$(INCL:;= -I) -isystem "$(BDS)/include/windows/rtl"
  31. .SUFFIXES: .cpp
  32. .path.obj = $(D)
  33. .cpp.obj:
  34. $(CC) $(BORFLAGS) -output-dir $(@D) {$< }
  35. #############################################################################
  36. # Goals to build
  37. LIB=$(LIB_PATH)\$(GOAL).lib
  38. GOALS=log.mode create.dir $(LIB)
  39. goal: $(GOALS)
  40. log.mode:
  41. @-echo BORLAND.MAK:
  42. @-echo GOAL=$(GOAL),
  43. @-echo CL_OPT=$(CL_OPT)
  44. @-echo DEFS=$(DEFS),
  45. @-echo CPPFLAGS=$(CPPFLAGS)
  46. @-echo D=$(D)
  47. create.dir:
  48. @-if not exist $(D) mkdir $(D)
  49. @-if not exist $(LIB_PATH) mkdir $(LIB_PATH)
  50. clean:
  51. @-if exist *.map erase *.map
  52. @-if exist *.dll erase *.dll
  53. @-if exist *.cfg erase *.cfg
  54. @-if exist *.rsp erase *.rsp
  55. @-if exist *.tds erase *.tds
  56. @-if exist $$DLLD.W rmdir $$DLLD.W /s
  57. @-if exist $$DLL.W rmdir $$DLL.W /s
  58. @-if exist $$NW rmdir $$NW /s
  59. @-if exist $$NWD rmdir $$NWD /s
  60. #############################################################################
  61. # Build the library from the up-to-date objs
  62. # Build final library
  63. $(LIB): $(OBJS)
  64. $(MKLIB) $@ $(**)
  65. #############################################################################