home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / tolkit45.zip / os2tk45 / samples / rexx / api / pmrexx / pmrexx.mak < prev    next >
Encoding:
Makefile  |  1999-05-11  |  3.5 KB  |  90 lines

  1. #===================================================================
  2. #
  3. #   PMREXX.MAK - PM REXX Interface Sample Makefile
  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. #       REXXLIBS - REXX libraries
  21. #===================================================================
  22.  
  23. !include ..\..\..\ibmsamp.inc
  24.  
  25. HEADERS = pmrexx.h pmrexxio.h pmrxhlp.h pmrxiodt.h rhdtatyp.h rxhdluse.h
  26. #-------------------------------------------------------------------
  27. #
  28. #   A list of all of the object files
  29. #
  30. #-------------------------------------------------------------------
  31.  
  32. EXE_OBJS = $(OBJDIR)\pmrexx.obj   $(OBJDIR)\rxhafile.obj
  33. DLL_OBJS = $(OBJDIR)\pmrexxio.obj $(OBJDIR)\pmrxsubs.obj
  34.  
  35. ALL_IPF = pmrexxio.ipf
  36. #-------------------------------------------------------------------
  37. #   This section lists all files to be built by the make.  The
  38. #   makefile builds the executible as well as its associated help
  39. #   file.
  40. #-------------------------------------------------------------------
  41. all: $(EXEDIR)\pmrexx.exe $(EXEDIR)\pmrexxio.dll $(EXEDIR)\pmrexxio.hlp
  42.  
  43. #-------------------------------------------------------------------
  44. #   This section creates the command file used by the linker.  This
  45. #   command file is recreated automatically every time you change
  46. #   the object file list, linker flags, or library list.
  47. #-------------------------------------------------------------------
  48. #-------------------------------------------------------------------
  49. #   Dependencies
  50. #     This section lists all object files needed to be built for the
  51. #     application, along with the files it is dependent upon (e.g.
  52. #     its source and any header files).
  53. #-------------------------------------------------------------------
  54. $(OBJDIR)\pmrexx.res: pmrexx.rc $(HEADERS) pmrexx.ico prodinfo.bmp
  55.                 $(RC) $(RCFLAGS) $(@B).rc $@
  56.  
  57. $(OBJDIR)\pmrexxio.res: pmrexxio.rc rxiohlp.rc $(HEADERS) prodinfo.bmp
  58.                 $(RC) $(RCFLAGS) $(@B).rc $@
  59.                 @del prodinfo.bmp
  60.  
  61. prodinfo.bmp:
  62.            copy ..\..\..\prodinfo.bmp $@
  63.  
  64. $(EXEDIR)\pmrexxio.hlp: $(ALL_IPF)
  65.  
  66. $(OBJDIR)\pmrexxio.obj: pmrexxio.c  $(HEADERS)
  67.    $(CC) -c $(DLLCFLAGS) -Fo"$(OBJDIR)\$(@B).obj" $(@B).c
  68.  
  69. $(OBJDIR)\pmrexx.obj:   pmrexx.c    $(HEADERS)
  70.  
  71. $(OBJDIR)\rxhafile.obj: rxhafile.c  $(HEADERS)
  72.  
  73. $(OBJDIR)\pmrxsubs.obj: pmrxsubs.c  $(HEADERS)
  74.    $(CC) -c $(DLLCFLAGS) -Fo"$(OBJDIR)\$(@B).obj" $(@B).c
  75.  
  76. $(EXEDIR)\pmrexx.exe: $(EXE_OBJS) pmrexx.def $(OBJDIR)\pmrexx.res
  77.    -$(CREATE_PATH)
  78.    $(LINK) $@ pmrexx.def $(MTLIBS) + $(REXXLIBS) $(EXE_OBJS)
  79.    $(RC) -p -x $(OBJDIR)\$(@B).res $@
  80.  
  81. $(EXEDIR)\pmrexxio.dll: $(DLL_OBJS) pmrexxio.def $(OBJDIR)\pmrexxio.res
  82.    -$(CREATE_PATH)
  83.    $(LINK) $@ $(DLLCFLAGS) pmrexxio.def $(MTLIBS) + $(REXXLIBS) $(DLL_OBJS)
  84.    $(RC) -p -x $(OBJDIR)\$(@B).res $@
  85.  
  86. clean :
  87.         @if exist *.obj del *.obj
  88.         @if exist *.dll del *.dll
  89.         @if exist *.exe del *.exe
  90.