You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

151 lines
7.1KB

  1. # Set the value of $(MSVCDir) for your installation.
  2. # MSVCDir="C:\Progra~1\Micros~1\VC98"
  3. # CFLAGS=/nologo /MD /W1 /GX /O2 /I "$(MSVCDir)\Include" /I . /I "Win32" /I "src" /D "WIN32" /D "_USRDLL" /YX /FD /Zm1000
  4. # PROG_LINK_FLAGS=/nologo /incremental:no /libpath:"$(MSVCDir)\Lib" /pdb:"libsamplerate-0.pdb" /machine:I386 /exetype:dynamic
  5. MSVCDir="C:\Progra~1\Micros~1.Net\Vc7"
  6. CFLAGS=/nologo /MD /W1 /GX /O2 /Zm200 /I "$(MSVCDir)\Include" /I "$(MSVCDir)\PlatformSDK\Include" /I . /I "Win32" /I "src" /D "WIN32" /D "_USRDLL" /YX /FD /Zm1000
  7. PROG_LINK_FLAGS=/nologo /incremental:no /libpath:"$(MSVCDir)\Lib" /libpath:"$(MSVCDir)\PlatformSDK\Lib" /pdb:"libsamplerate-0.pdb" /machine:I386 /exetype:dynamic
  8. CPP=cl.exe
  9. LINK32=link.exe
  10. DLL_LINK_FLAGS=/nologo /dll /incremental:no /libpath:"$(MSVCDir)\Lib" /pdb:"libsamplerate-0.pdb" /implib:".\libsamplerate-0.lib" /machine:I386 /out:"libsamplerate-0.dll"
  11. #====================================================================
  12. # Targets
  13. ALL : libsndfile-1.lib libsamplerate-0.dll \
  14. ".\examples\sndfile-resample.exe" \
  15. ".\examples\varispeed-play.exe"
  16. CLEAN :
  17. -@erase "src\*.obj"
  18. -@erase "tests\*.exe"
  19. #====================================================================
  20. LINK32_OBJS= \
  21. ".\src\samplerate.obj" \
  22. ".\src\src_linear.obj" \
  23. ".\src\src_zoh.obj" \
  24. ".\src\src_sinc.obj"
  25. libsamplerate-0.dll : $(LINK32_OBJS) ".\Win32\libsamplerate-0.def"
  26. $(LINK32) $(DLL_LINK_FLAGS) /def:".\Win32\libsamplerate-0.def" $(LINK32_OBJS)
  27. ".\examples\sndfile-resample.exe" : ".\examples\sndfile-resample.c"
  28. $(CPP) $(CFLAGS) /Fo".\examples\sndfile-resample.obj" /c ".\examples\sndfile-resample.c"
  29. $(LINK32) $(PROG_LINK_FLAGS) /out:".\examples\sndfile-resample.exe" ".\examples\sndfile-resample.obj" libsamplerate-0.lib libsndfile-1.lib
  30. ".\examples\varispeed-play.exe" : ".\examples\varispeed-play.c" ".\examples\audio_out.obj"
  31. $(CPP) $(CFLAGS) /Fo".\examples\varispeed-play.obj" /c ".\examples\varispeed-play.c"
  32. $(LINK32) $(PROG_LINK_FLAGS) /out:".\examples\varispeed-play.exe" ".\examples\varispeed-play.obj" ".\examples\audio_out.obj" libsamplerate-0.lib libsndfile-1.lib winmm.lib
  33. ".\examples\audio_out.obj" : ".\examples\audio_out.c"
  34. $(CPP) $(CFLAGS) /Fo".\examples\audio_out.obj" /c ".\examples\audio_out.c"
  35. TEST_PROGS= \
  36. ".\tests\misc_test.exe" \
  37. ".\tests\termination_test.exe" \
  38. ".\tests\simple_test.exe" \
  39. ".\tests\reset_test.exe" \
  40. ".\tests\multi_channel_test.exe" \
  41. ".\tests\snr_bw_test.exe" \
  42. ".\tests\throughput_test.exe"
  43. CHECK: $(TEST_PROGS)
  44. ".\tests\misc_test.exe"
  45. ".\tests\termination_test.exe"
  46. ".\tests\simple_test.exe"
  47. ".\tests\reset_test.exe"
  48. ".\tests\multi_channel_test.exe"
  49. ".\tests\snr_bw_test.exe"
  50. ".\tests\throughput_test.exe"
  51. -@echo ----------------------------------------------------------------------
  52. -@echo libsamplerate passed all tests
  53. -@echo ----------------------------------------------------------------------
  54. #====================================================================
  55. # C files in src.
  56. ".\src\samplerate.obj" : ".\src\samplerate.c"
  57. $(CPP) $(CFLAGS) /Fo".\src\samplerate.obj" /c ".\src\samplerate.c"
  58. ".\src\src_linear.obj" : ".\src\src_linear.c"
  59. $(CPP) $(CFLAGS) /Fo".\src\src_linear.obj" /c ".\src\src_linear.c"
  60. ".\src\src_zoh.obj" : ".\src\src_zoh.c"
  61. $(CPP) $(CFLAGS) /Fo".\src\src_zoh.obj" /c ".\src\src_zoh.c"
  62. ".\src\src_sinc.obj" : ".\src\src_sinc.c"
  63. $(CPP) $(CFLAGS) /Fo".\src\src_sinc.obj" /c ".\src\src_sinc.c"
  64. #====================================================================
  65. # Object files for test programs.
  66. ".\tests\util.obj" : ".\tests\util.c"
  67. $(CPP) $(CFLAGS) /Fo".\tests\util.obj" /c ".\tests\util.c"
  68. ".\tests\calc_snr.obj" : ".\tests\calc_snr.c"
  69. $(CPP) $(CFLAGS) /Fo".\tests\calc_snr.obj" /c ".\tests\calc_snr.c"
  70. ".\tests\dft_cmp.obj" : ".\tests\dft_cmp.c"
  71. $(CPP) $(CFLAGS) /Fo".\tests\dft_cmp.obj" /c ".\tests\dft_cmp.c"
  72. #====================================================================
  73. # Test programs.
  74. ".\tests\misc_test.exe" : ".\tests\misc_test.c" ".\tests\util.obj"
  75. $(CPP) $(CFLAGS) /Fo".\tests\misc_test.obj" /c ".\tests\misc_test.c"
  76. $(LINK32) $(PROG_LINK_FLAGS) /out:".\tests\misc_test.exe" ".\tests\misc_test.obj" ".\tests\util.obj" libsamplerate-0.lib
  77. ".\tests\termination_test.exe" : ".\tests\termination_test.c" ".\tests\util.obj"
  78. $(CPP) $(CFLAGS) /Fo".\tests\termination_test.obj" /c ".\tests\termination_test.c"
  79. $(LINK32) $(PROG_LINK_FLAGS) /out:".\tests\termination_test.exe" ".\tests\termination_test.obj" ".\tests\util.obj" libsamplerate-0.lib
  80. ".\tests\streaming_test.exe" : ".\tests\streaming_test.c" ".\tests\util.obj"
  81. $(CPP) $(CFLAGS) /Fo".\tests\streaming_test.obj" /c ".\tests\streaming_test.c"
  82. $(LINK32) $(PROG_LINK_FLAGS) /out:".\tests\streaming_test.exe" ".\tests\streaming_test.obj" ".\tests\util.obj" libsamplerate-0.lib
  83. ".\tests\simple_test.exe" : ".\tests\simple_test.c" ".\tests\util.obj"
  84. $(CPP) $(CFLAGS) /Fo".\tests\simple_test.obj" /c ".\tests\simple_test.c"
  85. $(LINK32) $(PROG_LINK_FLAGS) /out:".\tests\simple_test.exe" ".\tests\simple_test.obj" ".\tests\util.obj" libsamplerate-0.lib
  86. ".\tests\reset_test.exe" : ".\tests\reset_test.c" ".\tests\util.obj"
  87. $(CPP) $(CFLAGS) /Fo".\tests\reset_test.obj" /c ".\tests\reset_test.c"
  88. $(LINK32) $(PROG_LINK_FLAGS) /out:".\tests\reset_test.exe" ".\tests\reset_test.obj" ".\tests\util.obj" libsamplerate-0.lib
  89. ".\tests\multi_channel_test.exe" : ".\tests\multi_channel_test.c" ".\tests\util.obj" ".\tests\calc_snr.obj"
  90. $(CPP) $(CFLAGS) /Fo".\tests\multi_channel_test.obj" /c ".\tests\multi_channel_test.c"
  91. $(LINK32) $(PROG_LINK_FLAGS) /out:".\tests\multi_channel_test.exe" ".\tests\multi_channel_test.obj" ".\tests\util.obj" ".\tests\calc_snr.obj" libsamplerate-0.lib
  92. ".\tests\snr_bw_test.exe" : ".\tests\snr_bw_test.c" ".\tests\util.obj"
  93. $(CPP) $(CFLAGS) /Fo".\tests\snr_bw_test.obj" /c ".\tests\snr_bw_test.c"
  94. $(LINK32) $(PROG_LINK_FLAGS) /out:".\tests\snr_bw_test.exe" ".\tests\snr_bw_test.obj" ".\tests\util.obj" libsamplerate-0.lib
  95. ".\tests\throughput_test.exe" : ".\tests\throughput_test.c" ".\tests\util.obj"
  96. $(CPP) $(CFLAGS) /Fo".\tests\throughput_test.obj" /c ".\tests\throughput_test.c"
  97. $(LINK32) $(PROG_LINK_FLAGS) /out:".\tests\throughput_test.exe" ".\tests\throughput_test.obj" ".\tests\util.obj" libsamplerate-0.lib
  98. #====================================================================
  99. # Bit of extra trickery.
  100. sndfile.h libsndfile-1.dll libsndfile-1.def :
  101. -@echo *---------------------------------------------------------------
  102. -@echo * You need to get the pre-built Win32 binaries for libsndfile
  103. -@echo * from : http://www.mega-nerd.com/libsndfile
  104. -@echo * The prebuilt binaries will be in a ZIP file which contains
  105. -@echo * the files :
  106. -@echo * sndfile.h libsndfile-1.dll libsndfile-1.def
  107. -@echo * which need to be copied to this directory.
  108. -@echo *---------------------------------------------------------------
  109. -@exit 1
  110. libsndfile-1.lib : libsndfile-1.dll libsndfile-1.def
  111. lib /machine:i386 /def:libsndfile-1.def
  112. # End of Makefile
  113. #====================================================================