home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / tolkit45.zip / os2tk45 / samples / opengl / glutdemo / glutdemo.mak < prev    next >
Makefile  |  1999-05-11  |  3KB  |  84 lines

  1. #===================================================================
  2. #
  3. #   GLUTDEMO.MAK - OpenGL GLUT Demo Make file
  4. #   Copyright      IBM Corporation 1996
  5. #
  6. #===================================================================
  7. #===================================================================
  8. # Include the file ibmsamp.inc which defines the various macros
  9. # depending on the target specified.
  10. #
  11. # The following macros are defined in ibmsamp.inc:
  12. #
  13. #       OBJDIR   - Directory where object files are created
  14. #       EXEDIR   - Directory where executable files are created
  15. #       RC       - Resource compiler
  16. #       RCFLAGS  - Resource compiler flags
  17. #       LINK     - Linker
  18. #       LFLAGS   - Linker flags
  19. #       MTLIBS   - Multithreaded versions of the runtime libraries
  20. #===================================================================
  21.  
  22. !include ..\..\ibmsamp.inc
  23.  
  24. GLUTLIB = glut.lib
  25. OGLLIB  = opengl.lib
  26. CFLAGS  = $(CFLAGS) -Ss -W1 -Gm+ -DOS2
  27.  
  28. #-------------------------------------------------------------------
  29. #
  30. #   A list of all of the object files
  31. #
  32. #-------------------------------------------------------------------
  33.  
  34. OBJS = $(OBJDIR)\atlantis.obj \
  35.        $(OBJDIR)\whale.obj    \
  36.        $(OBJDIR)\shark.obj    \
  37.        $(OBJDIR)\dolphin.obj  \
  38.        $(OBJDIR)\swim.obj
  39.  
  40. #-------------------------------------------------------------------
  41. #   This section lists all files to be built by  make.  The
  42. #   makefile builds the executable as well as its associated help
  43. #   file.
  44. #-------------------------------------------------------------------
  45. all: $(EXEDIR)\atlantis.exe $(EXEDIR)\test7.exe
  46.  
  47. #-------------------------------------------------------------------
  48. #   Dependencies
  49. #     This section lists all object files needed to be built for the
  50. #     application, along with the files it is dependent upon (e.g.
  51. #     its source and any header files).
  52. #-------------------------------------------------------------------
  53.  
  54. $(OBJDIR)\atlantis.obj: atlantis.c atlantis.h
  55.    $(CC) -c $(CFLAGS) -Fo"$(OBJDIR)\$(@B).obj" $(@B).c
  56.  
  57. $(OBJDIR)\whale.obj:    whale.c    atlantis.h
  58.    $(CC) -c $(CFLAGS) -Fo"$(OBJDIR)\$(@B).obj" $(@B).c
  59.  
  60. $(OBJDIR)\shark.obj:    shark.c    atlantis.h
  61.    $(CC) -c $(CFLAGS) -Fo"$(OBJDIR)\$(@B).obj" $(@B).c
  62.  
  63. $(OBJDIR)\dolphin.obj:  dolphin.c  atlantis.h
  64.    $(CC) -c $(CFLAGS) -Fo"$(OBJDIR)\$(@B).obj" $(@B).c
  65.  
  66. $(OBJDIR)\swim.obj:     swim.c     atlantis.h
  67.    $(CC) -c $(CFLAGS) -Fo"$(OBJDIR)\$(@B).obj" $(@B).c
  68.  
  69. $(OBJDIR)\test7.obj:    test7.c
  70.    $(CC) -c $(CFLAGS) -Fo"$(OBJDIR)\$(@B).obj" $(@B).c
  71.  
  72. $(EXEDIR)\atlantis.exe: $(OBJS)   glutdemo.def
  73.    -$(CREATE_PATH)
  74.    $(LINK) $@ glutdemo.def $(MTLIBS) + $(OGLLIB) + $(GLUTLIB) $(OBJS)
  75.  
  76. $(EXEDIR)\test7.exe:    $(OBJDIR)\test7.obj glutdemo.def
  77.    -$(CREATE_PATH)
  78.    $(LINK) $@ glutdemo.def $(MTLIBS) + $(OGLLIB) + $(GLUTLIB) $(OBJDIR)\test7.obj
  79.  
  80. clean :
  81.         @if exist *.obj del *.obj
  82.         @if exist *.dll del *.dll
  83.         @if exist *.exe del *.exe
  84.