home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / template.zip / TEMPLATE.MAK < prev    next >
Makefile  |  1998-04-20  |  3KB  |  88 lines

  1. #===================================================================
  2. #
  3. #   TEMPLATE.MAK - Template Application 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. HEADERS = main.h xtrn.h help.c
  25. #-------------------------------------------------------------------
  26. #
  27. #   A list of all of the object files
  28. #
  29. #-------------------------------------------------------------------
  30.  
  31. OBJS = $(OBJDIR)\main.obj $(OBJDIR)\user.obj $(OBJDIR)\init.obj \
  32.        $(OBJDIR)\pnt.obj  $(OBJDIR)\dlg.obj  $(OBJDIR)\help.obj \
  33.        $(OBJDIR)\file.obj $(OBJDIR)\edit.obj $(OBJDIR)\thrd.obj
  34.  
  35. ALL_IPF = template.ipf file.ipf edit.ipf help.ipf dlg.ipf menu.ipf
  36. #-------------------------------------------------------------------
  37. #   This section lists all files to be built by  make.  The
  38. #   makefile builds the executable as well as its associated help
  39. #   file.
  40. #-------------------------------------------------------------------
  41. all: $(EXEDIR)\template.exe $(EXEDIR)\template.hlp
  42.  
  43. #-------------------------------------------------------------------
  44. #   Dependencies
  45. #     This section lists all object files needed to be built for the
  46. #     application, along with the files it is dependent upon (e.g.
  47. #     its source and any header files).
  48. #-------------------------------------------------------------------
  49.  
  50. $(OBJDIR)\template.res: $(HEADERS) main.rc main.ico template.dlg help.rc prodinfo.bmp
  51.                 $(RC) $(RCFLAGS) main.rc $@
  52.                 @del prodinfo.bmp
  53.  
  54. prodinfo.bmp :
  55.            copy ..\..\prodinfo.bmp $@
  56.  
  57. $(EXEDIR)\template.hlp: $(ALL_IPF)
  58.  
  59. $(OBJDIR)\main.obj:     main.c $(HEADERS)
  60.  
  61. $(OBJDIR)\file.obj:     file.c $(HEADERS)
  62.  
  63. $(OBJDIR)\edit.obj:     edit.c $(HEADERS)
  64.  
  65. $(OBJDIR)\user.obj:     user.c $(HEADERS)
  66.  
  67. $(OBJDIR)\init.obj:     init.c $(HEADERS)
  68.  
  69. $(OBJDIR)\pnt.obj:      pnt.c  $(HEADERS)
  70.  
  71. $(OBJDIR)\dlg.obj:      dlg.c  $(HEADERS)
  72.  
  73. $(OBJDIR)\help.obj:     help.c $(HEADERS)
  74.  
  75. $(OBJDIR)\thrd.obj:     thrd.c $(HEADERS)
  76.  
  77. $(EXEDIR)\template.exe: $(OBJS) $(@B).def $(OBJDIR)\$(@B).res
  78.    -$(CREATE_PATH)
  79.    $(LINK) $@ $(@B).def $(MTLIBS) @<<$(OBJDIR)\template.lnk
  80.    $(OBJS)
  81. <<
  82.    $(RC) -p -x $(OBJDIR)\$(@B).res $@
  83.  
  84. clean :
  85.         @if exist *.obj del *.obj
  86.         @if exist *.dll del *.dll
  87.         @if exist *.exe del *.exe
  88.