home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / sdk / graphics / directx / palette / makefile next >
Encoding:
Makefile  |  1997-08-01  |  1.2 KB  |  48 lines

  1. !include <win32.mak>
  2.  
  3. !if "$(nodebug)" == "1"
  4. OBJ_DIR = Retail
  5. !else
  6. OBJ_DIR = Debug
  7. !endif
  8.  
  9. proj=palette
  10.  
  11. OBJ_LIST = $(OBJ_DIR)\$(proj).obj  ..\misc\$(OBJ_DIR)\lbprintf.obj
  12.  
  13. mycflag=/I "..\misc"
  14.  
  15. all: mkdir $(OBJ_DIR)\$(proj).exe
  16.  
  17. $(OBJ_DIR)\$(proj).obj:  $(proj).cpp resource.h
  18.     $(cc) $(cdebug) $(cflags) -Fo$(OBJ_DIR)\$(proj).obj $(mycflag) \
  19.     $(cvars) $(proj).cpp
  20.     
  21. ..\misc\$(OBJ_DIR)\lbprintf.obj:  ..\misc\lbprintf.c ..\misc\lbprintf.h
  22.     $(cc) $(cdebug) $(cflags) -Fo..\misc\$(OBJ_DIR)\lbprintf.obj $(mycflag) \
  23.     $(cvars) ..\misc\lbprintf.c
  24.  
  25. $(OBJ_DIR)\$(proj).res: $(proj).rc resource.h
  26.    rc -r -fo $(OBJ_DIR)\$(proj).res $(proj).rc
  27.  
  28.  
  29. $(OBJ_DIR)\$(proj).exe: $(OBJ_LIST) $(proj).def $(OBJ_DIR)\$(proj).res
  30.     $(link) $(linkdebug) $(guiflags) -out:$(OBJ_DIR)\$(proj).exe \
  31.            $(OBJ_LIST) $(OBJ_DIR)\$(proj).res \
  32.            $(guilibs) ddraw.lib
  33.  
  34. mkdir:
  35.     if not exist $(OBJ_DIR)\NUL md $(OBJ_DIR)
  36.     if not exist ..\misc\$(OBJ_DIR)\NUL md ..\misc\$(OBJ_DIR)
  37.     
  38. # Rules for cleaning out those old files
  39. clean:
  40.     -echo y | del Retail
  41.     -echo y | del Debug
  42.     -echo y | del ..\misc\Retail
  43.     -echo y | del ..\misc\Debug
  44.     -rd Retail
  45.     -rd Debug
  46.     -rd ..\misc\Retail
  47.     -rd ..\misc\Debug
  48.