Advertisement
Guest User

lame makefile for compiling Source BSP maps

a guest
Mar 2nd, 2014
86
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Make 1.37 KB | None
  1.  
  2. .PHONY: auto full fast retail clean compile run set full_compile fast_compile convert game install uninstall del_log clear nobeta help
  3.  
  4. # vars
  5.  
  6. CD = C:\Lite Thread\_bssdk\hl2
  7. MAP = background05a
  8. WIDTH = 1200
  9. HEIGHT = 900
  10. MODE = windowed
  11.  
  12. # macros
  13.  
  14. auto: help
  15. full: set del_log full_compile install clear game
  16. fast: set del_log fast_compile install clear game
  17. retail: set del_log full_compile convert clear nobeta
  18. clean: del_log clear nobeta
  19. compile: full_compile
  20. run: install game
  21.  
  22. # commands
  23.  
  24. set:
  25.     setx VProject "$(CD)"
  26.  
  27. full_compile:
  28.     vbsp -low $(MAP)
  29.     vvis -low $(MAP)
  30.     vrad -extra -low $(MAP)
  31.  
  32. fast_compile:
  33.     vbsp -low $(MAP)
  34.     vvis -fast -low $(MAP)
  35.     vrad -extra -low $(MAP)
  36.  
  37. convert:
  38.     ren $(MAP).bsp $(MAP)_beta.bsp
  39.     bspconv $(MAP)_beta.bsp $(MAP).bsp
  40.  
  41. game:
  42.     ..\hl2.exe -dx9 -$(MODE) -width $(WIDTH) -height $(HEIGHT) -heapsize 524288 +cl_showfps 2 +map $(MAP)
  43.  
  44. install:
  45.     copy $(MAP).bsp ..\hl2\maps\$(MAP).bsp
  46.  
  47. uninstall:
  48.     if exist $(MAP).bsp del ..\hl2\maps\$(MAP).bsp
  49.  
  50. del_log:
  51.     if exist $(MAP).log del /Q /F $(MAP).log
  52.  
  53. clear:
  54.     if exist $(MAP).prt del /Q /F $(MAP).prt
  55.     if exist $(MAP).bsp del /Q /F $(MAP).bsp
  56.  
  57. nobeta:
  58.     if exist $(MAP)_beta.bsp del /Q /F $(MAP)_beta.bsp
  59.  
  60. help:
  61.     :
  62.     : make full
  63.     : make fast
  64.     : make retail
  65.     : make clean
  66.     : make compile
  67.     : make convert
  68.     : make install
  69.     : make uninstall
  70.     : make run
  71.     :
Advertisement
RAW Paste Data Copied
Advertisement