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

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