home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / cset21v6.zip / MMPM2TK / TK / MCDTEMP / MAKEFILE next >
Text File  |  1993-03-22  |  4KB  |  131 lines

  1. # SCCSID = @(#)makefile 13.44 92/04/27
  2. #################################################################################
  3. #                                                                               #
  4. # Makefile for OS/2 Multimedia extensions MCI Driver Template                   #
  5. #                                                                               #
  6. #   Generates One DLL:                                                          #
  7. #             MCDTemp.DLL - Ring 3 MCI Driver                                   #
  8. #                                                                               #
  9. # Copyright (c) IBM Corporation  1993                                           #
  10. # All Rights Reserved                                                           #
  11. #################################################################################
  12.  
  13.  
  14. .SUFFIXES:
  15. .SUFFIXES: .com .sys .exe .obj .mbj .asm .inc .def .lrf .crf .ref \
  16.            .lst .sym .map .c .h .lib .msg .txt .cvk
  17.  
  18. NAMEDLL=mcdtemp
  19.  
  20. #################################
  21. # Definitions for C Compiler
  22. # Compiler options (C Set/2 (Toronto))
  23. #    Q+  == Supress logo
  24. #    O+  == Optimize code (don't use with Ti)
  25. #    Ti  == Debug information
  26. #    Kp+ == Produce messages about unused function parameters
  27. #    Ss+ == Allow // comments
  28. #    Sm+ == Migration libraries (Microsoft C)
  29. #    Ge- == Build .DLL (default is .exe)
  30. #    Gm+ == Multithreaded libraries
  31. #    Gn+ == Do not generate default libraries in object
  32. #    Gs- == Do not remove stack probes (default)
  33. #    Kb- == Suppress basic diagnostic messages (default)
  34. #    Ki- == Suppress messages about uninitialized variables (default)
  35. #    Ms  == Use "system" calling conventions (as opposed to Mp optlink)
  36. #    Mp  =  Optlink (register passing convention ~10% faster)
  37. #    Fl+ == Produce listing
  38. #    L+  == Produce listing
  39. #    Ls+ == Include source in listing
  40. #    Fa+ == Produce assembler code
  41. #    Le+ == Expand macros
  42. #    La+ == Include offsets in structures in listing
  43. #    Sn+ == Provide DBCS support in runtime string routines
  44. #################################
  45.  
  46.  
  47. #################################
  48. # Definitions for C Compiler
  49. #################################
  50. CC=icc
  51. CFLAGS=  /C /Gd+ /Ge- /Gm+ /Gs- /Kb- /Ki- /Ms /Sm /Ss+ /Q /Mp /DINCL_32
  52.  
  53. #################################
  54. # Definitions for linker
  55. #################################
  56. LINK386=link386
  57. LFLAGS386= $(LNK_DEBUG) /batch /map /nod /noi /map /packcode /packdata /exepack /align:16 /nologo
  58. LIBS = OS2386.LIB DDE4MBS.LIB MMPM2.LIB
  59.  
  60. #################################
  61. # Definitions for resource compiler
  62. #################################
  63. RC = rc
  64. MAP=mapsym $(NAMEDLL)
  65.  
  66. #################################
  67. # Inference Rules
  68. #################################
  69. .c.obj:
  70.         $(CC) $(CFLAGS) /Fo$(<R).obj $(C_LST) $(<R).c
  71.  
  72. .asm.obj:
  73.         $(ASM) $(AFLAGS) $(<R).asm,$(<R).obj;
  74.  
  75. #################################
  76. # Object file lists
  77. #################################
  78. DLLOBJS1=mcdproc.obj mcdopen.obj mcdclose.obj mcddrvsv.obj mcddrvrt.obj mcdstat.obj
  79. DLLOBJS2=mcdinfo.obj mcdfuncs.obj
  80.  
  81. DLLOBJS=$(DLLOBJS1) $(DLLOBJS2)
  82.  
  83. #################################
  84. # Target Descriptions
  85. #################################
  86. all: dll
  87.  
  88. ##################################
  89. # mcdtemp Target Descriptions
  90. ##################################
  91. dll: $(NAMEDLL).dll
  92.  
  93. $(NAMEDLL).dll:   $(NAMEDLL).lrf $(NAMEDLL).def  \
  94.                   $(DLLOBJS)
  95.                   $(LINK386) $(LFLAGS386) @$(NAMEDLL).lrf
  96.                   $(MAP)
  97.  
  98. $(NAMEDLL).def: makefile
  99.         @echo Creating file <<$(@B).def
  100.  LIBRARY MCDTEMP INITINSTANCE
  101.  DATA MULTIPLE NONSHARED
  102.  SEGMENTS
  103.    SHR_SEG       CLASS 'FAR_DATA' SHARED
  104.    SHR_SEG_CONST CLASS 'FAR_DATA' SHARED
  105.    SHR_SEG_BSS   CLASS 'FAR_DATA' SHARED
  106.  
  107.  EXPORTS   mciDriverEntry
  108. <<keep
  109.  
  110. $(NAMEDLL).lrf: makefile
  111.         @echo Creating file <<$(@B).lrf
  112.  $(DLLOBJS)
  113.  $(NAMEDLL).dll
  114.  $(NAMEDLL).map /map /nod /noi
  115.  $(LIBS)
  116.  $(NAMEDLL).def;
  117. <<keep
  118.  
  119. clean:
  120.         if exist *.lrf  del *.lrf
  121.         if exist *.def  del *.def
  122.         if exist *.obj  del *.obj
  123.         if exist *.map  del *.map
  124.         if exist *.old  del *.old
  125.         if exist *.lst  del *.lst
  126.         if exist *.cod  del *.cod
  127.         if exist *.sys  del *.sys
  128.         if exist *.sym  del *.sym
  129.         if exist *.msg  del *.msg
  130.  
  131.