home *** CD-ROM | disk | FTP | other *** search
/ The Developer Connection…ice Driver Kit for OS/2 3 / DEV3-D1.ISO / source / devnews / vol2 / sample3 / os2.mak < prev    next >
Encoding:
Makefile  |  1993-12-29  |  3.0 KB  |  108 lines

  1. #===================================================================
  2. #
  3. #   Copyright 1992 IBM Corporation
  4. #
  5. #===================================================================
  6.  
  7. #
  8. #
  9.  
  10. #===================================================================
  11. #
  12. #   Sample application makefile, common definitions for the IBM C
  13. #   Set II compiler environment
  14. #
  15. #===================================================================
  16. .SUFFIXES:
  17. .SUFFIXES: .rc .res .obj .lst .c .asm .hlp .itl .ipf
  18. #===================================================================
  19. # Default compilation macros for sample programs
  20. #
  21. # Compile switches  that are enabled
  22. # /c      compile don't link
  23. # /ss     allow  "//" for comment lines
  24. # /Ms     use the system calling convention and not _optlink as the default
  25. # /Gd-    disable optimization
  26. # /Se     allow C Set/2  extensions
  27. #
  28. #
  29.  
  30. CC         = icc
  31.  
  32. GCFLAGS =
  33. OFLAGS  = /O- /Rn /Gr+ /Fa /Ls+
  34. CFLAGS  = /G3 /Sp1 /W3 /Ss+ /DM_I386 $(CINC) /Q /C $(GCFLAGS) $(FLAGS)
  35. SUPPRESSDLLLIBRARY = /gp
  36. LFLAGS   = /NOI /NOE /NOD /MAP:0 /EXEPACK /ALIGN:16
  37. LINK    = LINK386  $(LFLAGS)
  38. VLIBS   = DDE4NBS + vdh + os2386
  39. MLIBS   = DDE4MBS + os2386
  40. LDFLAGS   = /NOI /NOE /NOD /MAP:0 /DEB
  41.  
  42. .c.lst:
  43.     $(CC) -Fc$*.lst -Fo$*.obj $*.c
  44.  
  45. .c.obj:
  46. #    icc /Gm+ /Ss+ /Wpro+ /Ti+ /Q /C $< ;
  47.    $(CC) $(OFLAGS) $(CFLAGS) $(CINC) $< ;
  48.  
  49. #===================================================================
  50. #
  51. #   A list of all of the object files
  52. #
  53. #===================================================================
  54.  
  55. COBJ = vdft.obj
  56. OS2OBJ = os2thrd.obj
  57.  
  58.  
  59.  
  60.  
  61.  
  62. #-------------------------------------------------------------------
  63. #   This section lists all files to be built by the make.  The
  64. #   makefile builds the executible as well as its associated help
  65. #   file.
  66. #-------------------------------------------------------------------
  67. all: vdft.sys os2proc.exe
  68.  
  69.  
  70.  
  71. #-------------------------------------------------------------------
  72. #   This section creates the command file used by the linker.  This
  73. #   command file is recreated automatically every time you change
  74. #   the object file list, linker flags, or library list.
  75. #-------------------------------------------------------------------
  76.  
  77. #put in dependency for make file
  78. os2proc.lnk:
  79.      echo $(OS2OBJ)                >  os2proc.lnk
  80.      echo os2proc.exe              >> os2proc.lnk
  81.      echo os2proc.map              >> os2proc.lnk
  82.      echo $(MLIBS)                  >> os2proc.lnk
  83.      echo os2proc.def              >> os2proc.lnk
  84.  
  85.  
  86.  
  87.  
  88.  
  89. #===================================================================
  90. #
  91. # Dependencies
  92. #
  93. #   This section lists all object files needed to be built for the
  94. #   application, along with the files it is dependent upon (e.g. its
  95. #   source and any header files).
  96. #
  97. #===================================================================
  98.  
  99.  
  100. os2proc.obj: os2thrd.c
  101.      icc /Gm+ /Ss+ /Wpro+ /Ti+ /Q /C os2thrd.c
  102.  
  103.  
  104. os2proc.exe:  $(OS2OBJ) os2proc.def os2proc.lnk
  105.             $(LINK) $(LDFLAGS) @os2proc.lnk
  106.  
  107.  
  108.