Counter Strike : Global Offensive Source Code
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.

108 lines
3.4 KiB

  1. !IF "$(CPU)" != ""
  2. OS=NT
  3. ENV=WIN32
  4. !ELSE
  5. OS=DOS
  6. ENV=WIN16
  7. !ENDIF
  8. # Environment variables LIB and INCLUDE should point to your Win SDK libraries
  9. # and include files.
  10. # Define WINTAB to point to your wintab development tree
  11. # Example: WINTAB=c:\wintab
  12. WINTAB=..\..\..
  13. !include "$(OS)$(ENV).MAK"
  14. cinclude=-I$(srcdir) -I$(WINTAB)\include
  15. proj = MGRTEST
  16. projdll = MGRDLL
  17. all: $(proj).exe $(projdll).dll
  18. # force a complete rebuild from source.
  19. cleanall: clean
  20. -del *.exe
  21. -del *.dll
  22. #clean up everything but the .EXEs.
  23. clean:
  24. -del *.lib
  25. -del *.exp
  26. -del *.res
  27. -del *.?bj
  28. -del *.map
  29. # Update the resource if necessary
  30. $(proj).res: $(srcdir)\$(proj).rc $(srcdir)\mgrdlg.dlg $(srcdir)\mgrdlg.h $(srcdir)\$(proj).h
  31. $(rc) $(rcvars) -r -fo $(proj).res $(cvars) $(srcdir)\$(proj).rc
  32. !if defined(CPU)
  33. cvtres -$(CPU) $(proj).res -o $(proj).rbj
  34. !ENDIF
  35. OBJS = $(proj).obj mgrdlg.obj bitbox.obj btnMap.obj Csrmask.obj Infodlg.obj MoveMask.obj tests.obj BtnMask.obj
  36. # Update the object files if necessary
  37. $(proj).obj: $(srcdir)\$(proj).c $(srcdir)\$(proj).h $(srcdir)\mgrdlg.h
  38. $(cc) $(cflags) $(cinclude) $(cvars) $(cdebug) $(srcdir)\$(proj).c $(srcdir)\$(proj).h $(srcdir)\mgrdlg.h
  39. mgrdlg.obj: $(srcdir)\mgrdlg.c $(srcdir)\mgrdlg.h
  40. $(cc) $(cflags) $(cinclude) $(cvars) $(cdebug) $(srcdir)\mgrdlg.c $(srcdir)\mgrdlg.h
  41. mgrdll.obj: $(srcdir)\mgrdll.c
  42. $(cc) $(cflags) $(cinclude) $(cvars) $(cdebug) $(srcdir)\mgrdll.c
  43. bitbox.obj: $(srcdir)\bitbox.c
  44. $(cc) $(cflags) $(cinclude) $(cvars) $(cdebug) $(srcdir)\bitbox.c
  45. btnMap.obj: $(srcdir)\btnMap.c
  46. $(cc) $(cflags) $(cinclude) $(cvars) $(cdebug) $(srcdir)\btnMap.c
  47. btnMask.obj: $(srcdir)\btnMask.c
  48. $(cc) $(cflags) $(cinclude) $(cvars) $(cdebug) $(srcdir)\btnMask.c
  49. Infodlg.obj: $(srcdir)\Infodlg.c
  50. $(cc) $(cflags) $(cinclude) $(cvars) $(cdebug) $(srcdir)\Infodlg.c
  51. MoveMask.obj: $(srcdir)\MoveMask.c
  52. $(cc) $(cflags) $(cinclude) $(cvars) $(cdebug) $(srcdir)\MoveMask.c
  53. tests.obj: $(srcdir)\tests.c
  54. $(cc) $(cflags) $(cinclude) $(cvars) $(cdebug) $(srcdir)\tests.c
  55. Csrmask.obj: $(srcdir)\Csrmask.c
  56. $(cc) $(cflags) $(cinclude) $(cvars) $(cdebug) $(srcdir)\Csrmask.c
  57. # Update the exp file if necessary.
  58. $(projdll).exp $(projdll).lib: $(projdll).obj $(projdll).def
  59. $(implib) -machine:$(CPU) \
  60. -def:$(projdll).def \
  61. -out:$(projdll).lib $(projdll).obj -verbose
  62. # Since the link line has some severe differences depending on what
  63. # platform we are running on, we need to special case this so that
  64. # we execute the correct commands:
  65. !if defined(CPU)
  66. # This is for Windows NT:
  67. $(proj).exe: $(OBJS) $(proj).res $(proj).def
  68. $(link) $(linkdebug) $(guiflags) $(OBJS) \
  69. $(WINTAB)\lib\$(CPU)\wintab32.lib $(guilibs) VERSION.LIB \
  70. $(proj).rbj -out:$(proj).exe /machine:$(CPU)
  71. $(projdll).dll: $(projdll).obj $(projdll).def $(projdll).exp
  72. $(link) $(linkdebug) $(guiflags) $(projdll).obj $(projdll).exp \
  73. $(guilibsdll) VERSION.LIB -out:$(projdll).dll \
  74. /machine:$(CPU) -entry:_DllMainCRTStartup$(DLLENTRY) -dll
  75. !ENDIF
  76. !if !defined(CPU)
  77. # This is for Windows DOS:
  78. $(proj).exe: $(OBJS) $(proj).res $(proj).def
  79. $(link) $(guiflags) $(OBJS) ,,, $(WINTAB)\lib\wintab.lib $(guilibs) , $(proj).DEF
  80. rc $(proj).res
  81. $(projdll).dll: $(projdll).obj $(projdll).def
  82. $(link) $(guiflags) libentry.obj $(projdll).obj ,$(projdll).dll,, \
  83. $(WINTAB)\lib\wintab.lib $(guilibsdll) , $(projdll).DEF
  84. rc $(projdll).dll
  85. !ENDIF