Advertisement
Guest User

Untitled

a guest
Sep 30th, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Make 1.65 KB | None | 0 0
  1. OUTPUT_DLL = ctest.dll
  2. OUTPUT_BASE_DIR = build
  3. OUTPUT_DEBUG_DIR = $(OUTPUT_BASE_DIR)\debug
  4. OUTPUT_RELEASE_DIR = $(OUTPUT_BASE_DIR)\release
  5. INPUT_DIR = src
  6.  
  7. API_DIR = ..\..\API
  8. GAME_DIR = ..\..\Game
  9. OP2_DLL = $(API_DIR)\Outpost2DLL\Lib\Outpost2DLL.lib
  10.  
  11. INCLUDES = \
  12.     /I include \
  13.     /I $(API_DIR) \
  14.     /I $(API_DIR)\HFL\Source
  15.  
  16. create_dirs:
  17.     @if not exist $(OUTPUT_BASE_DIR) mkdir $(OUTPUT_BASE_DIR)
  18.     @if not exist $(OUTPUT_DEBUG_DIR) mkdir $(OUTPUT_DEBUG_DIR)
  19.     @if not exist $(OUTPUT_RELEASE_DIR) mkdir $(OUTPUT_RELEASE_DIR)
  20.  
  21. clean:
  22.     @if exist $(OUTPUT_RELEASE_DIR) rmdir /S /Q $(OUTPUT_RELEASE_DIR)
  23.     @if exist $(OUTPUT_DEBUG_DIR) rmdir /S /Q $(OUTPUT_DEBUG_DIR)
  24.     @if exist $(OUTPUT_BASE_DIR) rmdir /S /Q $(OUTPUT_BASE_DIR)
  25.  
  26. {$(INPUT_DIR)\}.cpp{$(OUTPUT_DEBUG_DIR)\}.obj::
  27.     $(CPP) /c /Od /MDd /W3 /D "_MBCS" /Fo:$(OUTPUT_DEBUG_DIR)\ $(INCLUDES) $<
  28.  
  29. {$(INPUT_DIR)\}.cpp{$(OUTPUT_RELEASE_DIR)\}.obj::
  30.     $(CPP) /c /O2 /MD /GL /W3 /D "_MBCS" /Fo:$(OUTPUT_RELEASE_DIR)\ $(INCLUDES) $<
  31.  
  32. compile_debug: create_dirs $(OUTPUT_DEBUG_DIR)\*.obj
  33.  
  34. compile_release: create_dirs $(OUTPUT_RELEASE_DIR)\*.obj
  35.  
  36. $(OUTPUT_DEBUG_DIR)\$(OUTPUT_DLL): compile_debug
  37.     link.exe /DLL /BASE:0x11000000 /DEBUG /OUT:$(OUTPUT_DEBUG_DIR)\$(OUTPUT_DLL) $(OP2_DLL) $(OUTPUT_DEBUG_DIR)\*.obj
  38.  
  39. $(OUTPUT_RELEASE_DIR)\$(OUTPUT_DLL): compile_release
  40.     link.exe /DLL /BASE:0x11000000 /OUT:$(OUTPUT_RELEASE_DIR)\$(OUTPUT_DLL) $(OP2_DLL) $(OUTPUT_RELEASE_DIR)\*.obj
  41.  
  42. debug: $(OUTPUT_DEBUG_DIR)\$(OUTPUT_DLL)
  43.     copy $(OUTPUT_DEBUG_DIR)\$(OUTPUT_DLL) $(GAME_DIR)\$(OUTPUT_DLL)
  44.  
  45. release: $(OUTPUT_RELEASE_DIR)\$(OUTPUT_DLL)
  46.     copy $(OUTPUT_RELEASE_DIR)\$(OUTPUT_DLL) $(GAME_DIR)\$(OUTPUT_DLL)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement