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 / ddex2 / makefile < prev    next >
Makefile  |  1997-07-31  |  1KB  |  47 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=ddex2
  10.  
  11. OBJ_LIST = $(OBJ_DIR)\$(proj).obj ..\misc\$(OBJ_DIR)\ddutil.obj
  12.  
  13. mycflag=/I "..\misc"
  14.  
  15. all: mkdir $(OBJ_DIR)\$(proj).exe
  16.  
  17. $(OBJ_DIR)\$(proj).obj:  $(proj).cpp resource.h ..\misc\ddutil.h
  18.     $(cc) $(cdebug) $(cflags) -Fo$(OBJ_DIR)\$(proj).obj $(mycflag) \
  19.     $(cvars) $(proj).cpp
  20.     
  21. ..\misc\$(OBJ_DIR)\ddutil.obj:  ..\misc\ddutil.cpp ..\misc\ddutil.h
  22.     $(cc) $(cdebug) $(cflags) -Fo..\misc\$(OBJ_DIR)\ddutil.obj $(mycflag) \
  23.     $(cvars) ..\misc\ddutil.cpp
  24.  
  25. $(OBJ_DIR)\$(proj).res: $(proj).rc resource.h
  26.    rc -r -fo $(OBJ_DIR)\$(proj).res $(proj).rc
  27.  
  28. $(OBJ_DIR)\$(proj).exe: $(OBJ_LIST) $(proj).def $(OBJ_DIR)\$(proj).res
  29.     $(link) $(linkdebug) $(guiflags) -out:$(OBJ_DIR)\$(proj).exe \
  30.            $(OBJ_LIST) $(OBJ_DIR)\$(proj).res \
  31.            $(guilibs) ddraw.lib
  32.  
  33. mkdir:
  34.     if not exist $(OBJ_DIR)\NUL md $(OBJ_DIR)
  35.     if not exist ..\misc\$(OBJ_DIR)\NUL md ..\misc\$(OBJ_DIR)
  36.  
  37. # Rules for cleaning out those old files
  38. clean:
  39.     -echo y | del Retail
  40.     -echo y | del Debug
  41.     -echo y | del ..\misc\Retail
  42.     -echo y | del ..\misc\Debug
  43.     -rd Retail
  44.     -rd Debug
  45.     -rd ..\misc\Retail
  46.     -rd ..\misc\Debug
  47.