home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / tolkit45.zip / os2tk45 / samples / wps / wsfile / wsfile.mak < prev    next >
Text File  |  1999-05-11  |  4KB  |  116 lines

  1. #****************************************************************************
  2. #
  3. #  Work Place Shell - car Sample makefile - SOM 2.1 / IDL version
  4. #
  5. #  Copyright (C) 1993, 1994 IBM Corporation
  6. #
  7. #      DISCLAIMER OF WARRANTIES.  The following [enclosed] code is
  8. #      sample code created by IBM Corporation. This sample code is not
  9. #      part of any standard or IBM product and is provided to you solely
  10. #      for  the purpose of assisting you in the development of your
  11. #      applications.  The code is provided "AS IS", without
  12. #      warranty of any kind.  IBM shall not be liable for any damages
  13. #      arising out of your use of the sample code, even if they have been
  14. #      advised of the possibility of such damages.
  15. #
  16. #      NOTE: you will have to modify the environment variables to suit
  17. #            your environment
  18. #
  19. #****************************************************************************
  20.  
  21. !include ..\..\ibmsamp.inc
  22.  
  23. #-------------------------------------------------------------------
  24. #
  25. #   A list of all of the object files
  26. #
  27. #-------------------------------------------------------------------
  28.  
  29. FILE_OBJS   = $(OBJDIR)\wsfile.obj
  30. FOLDER_OBJS = $(OBJDIR)\wsfolder.obj
  31.  
  32. SOMTEMP = .\somtemp
  33.  
  34. !if [set SMTMP=$(SOMTEMP)] || \
  35.     [set SMEMIT=ih;h;c] || \
  36.     [set SMADDSTAR=1] || \
  37.     [set SMNOTC=1]
  38. !endif
  39.  
  40. !if [cd $(SOMTEMP)]
  41. !  if [md $(SOMTEMP)]
  42. !    error error creating $(SOMTEMP) directory
  43. !  endif
  44. !else
  45. !  if [cd ..]
  46. !    error - Couldn't cd .. from $(SOMTEMP) directory
  47. !  endif
  48. !endif
  49.  
  50. FILE_IPF   = wsfile.ipf
  51. FOLDER_IPF = wsfolder.ipf
  52.  
  53. #-------------------------------------------------------------------
  54. #   This section lists all files to be built by the make.  The
  55. #   makefile builds the executible as well as its associated help
  56. #   file.
  57. #-------------------------------------------------------------------
  58. all: clean $(EXEDIR)\wsfile.dll $(EXEDIR)\wsfolder.dll  \
  59.            $(EXEDIR)\wsfile.hlp $(EXEDIR)\wsfolder.hlp
  60.  
  61. #-------------------------------------------------------------------
  62. #   Dependencies
  63. #     This section lists all object files needed to be built for the
  64. #     application, along with the files it is dependent upon (e.g.
  65. #     its source and any header files).
  66. #-------------------------------------------------------------------
  67. $(OBJDIR)\wsfile.res: wsfile.rc wsfile.ih
  68.                 $(RC) $(RCFLAGS) $(@B).rc $@
  69.  
  70. $(OBJDIR)\wsfolder.res: wsfolder.rc wsfolder.ih
  71.                 $(RC) $(RCFLAGS) $(@B).rc $@
  72.  
  73. $(EXEDIR)\wsfile.hlp:   $(FILE_IPF)
  74.  
  75. $(EXEDIR)\wsfolder.hlp: $(FOLDER_IPF)
  76.  
  77. wsfile.h:     wsfile.idl
  78.  
  79. wsfile.def:   wsfile.idl
  80.  
  81. wsfile.ih:    wsfile.idl
  82.  
  83. wsfile.c:     wsfile.idl
  84.  
  85. wsfolder.h:   wsfolder.idl
  86.  
  87. wsfolder.def: wsfolder.idl
  88.  
  89. wsfolder.ih:  wsfolder.idl
  90.  
  91. wsfolder.c:   wsfolder.idl
  92.  
  93. $(OBJDIR)\wsfile.obj:    wsfile.h   wsfile.c    wsfile.ih   wsfile.idl
  94.    $(CC) -c $(DLLCFLAGS) -DSOM_DONT_USE_INHERITED_MACROS -I. -Fo"$(OBJDIR)\$(@B).obj" $(@B).c
  95.  
  96. $(OBJDIR)\wsfolder.obj:  wsfolder.h wsfolder.c  wsfolder.ih wsfolder.idl
  97.    $(CC) -c $(DLLCFLAGS) -DSOM_DONT_USE_INHERITED_MACROS -I. -Fo"$(OBJDIR)\$(@B).obj" $(@B).c
  98.  
  99. $(EXEDIR)\wsfile.dll: wsfile.def $(FILE_OBJS) $(OBJDIR)\wsfile.res
  100.    -$(CREATE_PATH)
  101.    $(LINK) $@ $(DLLCFLAGS) $(@B).def $(DLLLIBS) + $(SOMLIBS) $(FILE_OBJS)
  102.    $(RC) -p -x $(OBJDIR)\$(@B).res $@
  103.  
  104. $(EXEDIR)\wsfolder.dll: wsfolder.def $(FOLDER_OBJS) $(OBJDIR)\wsfolder.res
  105.    -$(CREATE_PATH)
  106.    $(LINK) $@ $(DLLCFLAGS) $(@B).def $(DLLLIBS) + $(SOMLIBS) $(FOLDER_OBJS)
  107.    $(RC) -p -x $(OBJDIR)\$(@B).res $@
  108.  
  109. clean:
  110.         @if exist wsfile.h   del wsfile.h
  111.         @if exist wsfile.ih  del wsfile.ih
  112.         @if exist wsfile.def del wsfile.def
  113.         @if exist wsfolder.h   del wsfolder.h
  114.         @if exist wsfolder.ih  del wsfolder.ih
  115.         @if exist wsfolder.def del wsfolder.def
  116.