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

  1. #===================================================================
  2. #
  3. #   NPIPE.MAK -  Named Pipe 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. SVR_HEADERS = svrpmain.h svrpxtrn.h svrpglbl.h svrphelp.h namepipe.h
  25. CLI_HEADERS = clnpmain.h clnpxtrn.h clnpglbl.h clnphelp.h namepipe.h
  26. #-------------------------------------------------------------------
  27. #
  28. #   A list of all of the object files
  29. #
  30. #-------------------------------------------------------------------
  31.  
  32. SVR_OBJS = $(OBJDIR)\svrpmain.obj $(OBJDIR)\svrpthrd.obj $(OBJDIR)\svrppnt.obj  \
  33.            $(OBJDIR)\svrpgame.obj $(OBJDIR)\svrphelp.obj
  34. CLI_OBJS = $(OBJDIR)\clnpmain.obj $(OBJDIR)\clnpthrd.obj $(OBJDIR)\clnphelp.obj
  35.  
  36. SVR_IPF = svrnpipe.ipf file.ipf    svroptn.ipf help.ipf dlg.ipf
  37. CLI_IPF = clinpipe.ipf clifile.ipf clioptn.ipf help.ipf clidlg.ipf
  38.  
  39. #-------------------------------------------------------------------
  40. #   This section lists all files to be built by  make.  The
  41. #   makefile builds the executable as well as its associated help
  42. #   file.
  43. #-------------------------------------------------------------------
  44. all: $(EXEDIR)\svrnpipe.exe $(EXEDIR)\svrnpipe.hlp \
  45.      $(EXEDIR)\clinpipe.exe $(EXEDIR)\clinpipe.hlp
  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)\svrnpipe.res: svrnpipe.rc namepipe.ico svrpmain.h \
  55.                         svrphelp.rc svrphelp.h   prodinfo.bmp
  56.                 $(RC) $(RCFLAGS) $(@B).rc $@
  57.                 @del prodinfo.bmp
  58.  
  59. $(OBJDIR)\clinpipe.res: clinpipe.rc namepipe.ico clnpmain.h \
  60.                         clnphelp.rc clnphelp.h
  61.                 copy ..\..\prodinfo.bmp
  62.                 $(RC) $(RCFLAGS) $(@B).rc $@
  63.                 @del prodinfo.bmp
  64.  
  65. prodinfo.bmp :
  66.            copy ..\..\prodinfo.bmp $@
  67.  
  68. $(EXEDIR)\svrnpipe.hlp: $(SVR_IPF)
  69.  
  70. $(EXEDIR)\clinpipe.hlp: $(CLI_IPF)
  71.  
  72. $(OBJDIR)\svrpmain.obj: svrpmain.c $(SVR_HEADERS)
  73.  
  74. $(OBJDIR)\svrpthrd.obj: svrpthrd.c $(SVR_HEADERS)
  75.  
  76. $(OBJDIR)\svrpgame.obj: svrpgame.c $(SVR_HEADERS)
  77.  
  78. $(OBJDIR)\svrppnt.obj:  svrppnt.c  $(SVR_HEADERS)
  79.  
  80. $(OBJDIR)\svrphelp.obj: svrphelp.c $(SVR_HEADERS)
  81.  
  82. $(OBJDIR)\clnpmain.obj: clnpmain.c $(CLI_HEADERS)
  83.  
  84. $(OBJDIR)\clnpthrd.obj: clnpthrd.c $(CLI_HEADERS)
  85.  
  86. $(OBJDIR)\clnphelp.obj: clnphelp.c $(CLI_HEADERS)
  87.  
  88. $(EXEDIR)\svrnpipe.exe: $(SVR_OBJS) $(@B).def $(OBJDIR)\$(@B).res
  89.    -$(CREATE_PATH)
  90.    $(LINK) $@ $(@B).def $(MTLIBS) $(SVR_OBJS)
  91.    $(RC) -p -x $(OBJDIR)\$(@B).res $@
  92.  
  93. $(EXEDIR)\clinpipe.exe: $(CLI_OBJS) $(@B).def $(OBJDIR)\$(@B).res
  94.    -$(CREATE_PATH)
  95.    $(LINK) $@ $(@B).def $(MTLIBS) $(CLI_OBJS)
  96.    $(RC) -p -x $(OBJDIR)\$(@B).res $@
  97.  
  98. clean :
  99.         @if exist *.obj del *.obj
  100.         @if exist *.dll del *.dll
  101.         @if exist *.exe del *.exe
  102.