home *** CD-ROM | disk | FTP | other *** search
/ Microsoft Multimedia Jumpstart 1.1a / CD_ROM.BIN / develpmt / source / waveconv / makefile < prev    next >
Encoding:
Makefile  |  1992-10-27  |  3.9 KB  |  182 lines

  1. #
  2. #   Makefile for WAVECONV (wave file conversion app for Microsoft's ADPCM)
  3. #
  4. #     (C) Copyright Microsoft Corp. 1991, 1992.  All rights reserved.
  5. #
  6. #     You have a royalty-free right to use, modify, reproduce and 
  7. #     distribute the Sample Files (and/or any modified version) in 
  8. #     any way you find useful, provided that you agree that 
  9. #     Microsoft has no warranty obligations or liability for any 
  10. #     Sample Application Files which are modified. 
  11. #     
  12. #     If you did not get this from Microsoft Sources, then it may not be the
  13. #     most current version.  This sample code in particular will be updated
  14. #     and include more documentation.  
  15. #
  16. #     Sources are:
  17. #         The MM Sys File Transfer BBS: The phone number is 206 936-4082.
  18. #    CompuServe: WINSDK forum, MDK section.
  19. #    Anon FTP from ftp.uu.net in vendors/microsoft/multimedia
  20. #
  21. #   to make a NON-DEBUG build, type the following line:
  22. #       nmake DEBUG=NO
  23. #   just typing 'nmake' will build a DEBUG build
  24. #
  25. #   You can also set the environment variable DEBUG to NO
  26. #
  27.  
  28. # set MASM6 to TRUE to use MASM 6
  29. #
  30. # let environment variable overide...
  31. # !IF "$(MASM6)" == ""
  32. # MASM6    = FALSE
  33. # !ENDIF
  34.  
  35. NAME    = waveconv
  36. MISC    = makefile
  37.  
  38. # add -Fc if you want to see assembler that is generated: 
  39. OPTZ    = -AM -G2sw -Oxwt   # -Fc
  40.  
  41. INCS    = $(NAME).h  
  42. SRCS    = $(NAME).c  
  43. OBJ1    = $(NAME).obj waveio.obj riffsup.obj 
  44. OBJ2    = wavesup.obj muldiv32.obj 
  45. OBJ3    = msadpcm.obj pcm.obj
  46. OBJS    = $(OBJ1) $(OBJ2) $(OBJ3)
  47. LIBS    = libw mmsystem mlibcew commdlg shell
  48.  
  49.  
  50. !IF "$(DEBUG)" == "NO"
  51.  
  52. DEF     =
  53. ASOPT   =
  54. CCOPT   =
  55. RCOPT   =
  56. LNOPT   =
  57.  
  58. !ELSE
  59.  
  60. DEF     = -DDEBUG
  61. ASOPT   = -Zi
  62. CCOPT   = -Zid
  63. RCOPT   =
  64. LNOPT   = /CO/LI
  65.  
  66. !ENDIF
  67.  
  68. !IF "$(MASM6)" == "TRUE"
  69. # masm 6.x
  70. AS  = mlx -DMASM6 -I. /Zm /c $(DEF) -Cx $(ASOPT)
  71. !ELSE
  72. AS  = masm $(DEF) -Mx $(ASOPT)
  73. !ENDIF
  74.  
  75. CC  = cl $(DEF) -c $(OPTZ) -W3 -Zpe $(CCOPT)
  76. RC  = rc $(DEF) -v $(RCOPT)
  77. LN  = link /NOPACKC/NOE/NOD/A:16/MAP $(LNOPT)
  78.  
  79. .asm.obj:
  80.             $(AS) $* ;
  81.  
  82. .c.obj  :
  83.             $(CC) $*.c
  84.  
  85.  
  86. #
  87. #   RULES
  88. #
  89.  
  90. all :  $(NAME).exe
  91.  
  92.  
  93. $(NAME).exe :   $(OBJS) $(NAME).res $(NAME).def
  94.     $(LN) @<<
  95.     $(OBJ1)+
  96.     $(OBJ2)+
  97.     $(OBJ3),
  98.     $(NAME).exe,
  99.     $(NAME).map,
  100.     $(LIBS),
  101.     $(NAME).def
  102. <<
  103.                 $(RC) -t $(NAME).res
  104. !IF "$(DEBUG)" != "NO"
  105.                 -cvpack -p $(NAME).exe
  106. !ENDIF
  107.                 -mapsym $(NAME).map
  108.  
  109. $(NAME).res :   $(NAME).rc $(NAME).h $(NAME).ico
  110.                 $(RC) -r $(NAME).rc
  111.  
  112.  
  113. #
  114. #   SEGMENTATION
  115. #
  116.  
  117. SEGC = $(CC) -NT TSEG $*.c
  118.  
  119. !IF "$(MASM6)" == "TRUE"
  120. # masm 6.x
  121. SEGA = $(AS) -DSEGNAME=TSEG -Ta $*.asm
  122. !ELSE
  123. # masm 5.x
  124. SEGA = $(AS) -DSEGNAME=TSEG $* ;
  125. !ENDIF
  126.  
  127. $(NAME).obj     : ; $(SEGC:TSEG=_TEXT)
  128. waveio.obj      : ; $(SEGC:TSEG=WAVEIO_TEXT)
  129. msadpcm.obj     : ; $(SEGC:TSEG=MSADPCM_TEXT)
  130. wavesup.obj     : ; $(SEGC:TSEG=WAVESUP_TEXT)
  131. muldiv32.obj    : ; $(SEGA:TSEG=WAVESUP_TEXT)
  132. riffsup.obj     : ; $(SEGC:TSEG=RIFFSUP_TEXT)
  133. pcm.obj        : ; $(SEGC:TSEG=PCM_TEXT)
  134.  
  135. #
  136. #   DEPENDENCIES
  137. #
  138.  
  139. $(NAME).obj :   $(NAME).c $(NAME).h msadpcm.h waveio.h riffsup.h pcm.h wavesup.h
  140.  
  141. waveio.obj  :   waveio.c waveio.h wavesup.h
  142.  
  143. msadpcm.obj :   msadpcm.c msadpcm.h  pcm.h
  144.  
  145. wavesup.obj :   wavesup.c wavesup.h
  146.  
  147. muldiv32.obj:   muldiv32.asm
  148.  
  149. pcm.obj     :    pcm.h
  150.  
  151. waveconv.res:    waveconv.rc waveconv.h waveconv.rcv wavever.h wavever.ver
  152.  
  153.  
  154. #
  155. #   MISC. STUFF
  156. #
  157.  
  158. zip     :   clean
  159.             pkzip -a $(NAME).zip *.*
  160.  
  161. ship    :   all
  162.             del *.err
  163.             del *.cod
  164.             del *.res
  165.             del *.obj
  166.             del *.map
  167.             del *.sym
  168.             del *.zip
  169.             touch *.*
  170.             pkzip -a $(NAME).zip *.*
  171.  
  172. clean   :
  173.             del *.exe
  174.             del *.lib
  175.             del *.cod
  176.             del *.err
  177.             del *.res
  178.             del *.obj
  179.             del *.map
  180.             del *.sym
  181.             del *.zip
  182.