Bundle libsamplerate
[audio-libsamplerate.git] / libsamplerate / Win32 / Makefile.msvc
diff --git a/libsamplerate/Win32/Makefile.msvc b/libsamplerate/Win32/Makefile.msvc
new file mode 100644 (file)
index 0000000..4162f82
--- /dev/null
@@ -0,0 +1,150 @@
+\r
+# Set the value of $(MSVCDir) for your installation.\r
+\r
+# MSVCDir="C:\Progra~1\Micros~1\VC98"\r
+# CFLAGS=/nologo /MD /W1 /GX /O2 /I "$(MSVCDir)\Include" /I . /I "Win32" /I "src" /D "WIN32" /D "_USRDLL" /YX /FD /Zm1000\r
+# PROG_LINK_FLAGS=/nologo /incremental:no /libpath:"$(MSVCDir)\Lib" /pdb:"libsamplerate-0.pdb" /machine:I386 /exetype:dynamic\r
+\r
+MSVCDir="C:\Progra~1\Micros~1.Net\Vc7"\r
+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\r
+PROG_LINK_FLAGS=/nologo /incremental:no /libpath:"$(MSVCDir)\Lib" /libpath:"$(MSVCDir)\PlatformSDK\Lib" /pdb:"libsamplerate-0.pdb" /machine:I386 /exetype:dynamic\r
+\r
+CPP=cl.exe\r
+LINK32=link.exe\r
+DLL_LINK_FLAGS=/nologo /dll /incremental:no /libpath:"$(MSVCDir)\Lib" /pdb:"libsamplerate-0.pdb" /implib:".\libsamplerate-0.lib" /machine:I386 /out:"libsamplerate-0.dll"\r
+\r
+#====================================================================\r
+# Targets\r
+\r
+ALL : libsndfile-1.lib libsamplerate-0.dll \\r
+       ".\examples\sndfile-resample.exe" \\r
+       ".\examples\varispeed-play.exe"\r
+\r
+CLEAN :\r
+    -@erase "src\*.obj"\r
+    -@erase "tests\*.exe"\r
+\r
+#====================================================================\r
+\r
+LINK32_OBJS= \\r
+       ".\src\samplerate.obj" \\r
+       ".\src\src_linear.obj" \\r
+       ".\src\src_zoh.obj" \\r
+       ".\src\src_sinc.obj"\r
+\r
+libsamplerate-0.dll : $(LINK32_OBJS) ".\Win32\libsamplerate-0.def"\r
+    $(LINK32) $(DLL_LINK_FLAGS) /def:".\Win32\libsamplerate-0.def" $(LINK32_OBJS)\r
+\r
+".\examples\sndfile-resample.exe" : ".\examples\sndfile-resample.c"\r
+    $(CPP) $(CFLAGS) /Fo".\examples\sndfile-resample.obj" /c ".\examples\sndfile-resample.c"\r
+    $(LINK32) $(PROG_LINK_FLAGS) /out:".\examples\sndfile-resample.exe" ".\examples\sndfile-resample.obj" libsamplerate-0.lib libsndfile-1.lib\r
+\r
+".\examples\varispeed-play.exe" : ".\examples\varispeed-play.c" ".\examples\audio_out.obj"\r
+    $(CPP) $(CFLAGS) /Fo".\examples\varispeed-play.obj" /c ".\examples\varispeed-play.c"\r
+    $(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\r
+\r
+".\examples\audio_out.obj" : ".\examples\audio_out.c"\r
+    $(CPP) $(CFLAGS) /Fo".\examples\audio_out.obj" /c ".\examples\audio_out.c"\r
+\r
+TEST_PROGS= \\r
+    ".\tests\misc_test.exe" \\r
+    ".\tests\termination_test.exe" \\r
+    ".\tests\simple_test.exe" \\r
+    ".\tests\reset_test.exe" \\r
+    ".\tests\multi_channel_test.exe" \\r
+    ".\tests\snr_bw_test.exe" \\r
+       ".\tests\throughput_test.exe"\r
+\r
+CHECK: $(TEST_PROGS)\r
+     ".\tests\misc_test.exe"\r
+     ".\tests\termination_test.exe"\r
+     ".\tests\simple_test.exe"\r
+     ".\tests\reset_test.exe"\r
+     ".\tests\multi_channel_test.exe"\r
+     ".\tests\snr_bw_test.exe"\r
+        ".\tests\throughput_test.exe"\r
+    -@echo ----------------------------------------------------------------------\r
+    -@echo libsamplerate passed all tests\r
+    -@echo ----------------------------------------------------------------------\r
+\r
+#====================================================================\r
+# C files in src.\r
+\r
+".\src\samplerate.obj" : ".\src\samplerate.c"\r
+    $(CPP) $(CFLAGS) /Fo".\src\samplerate.obj" /c ".\src\samplerate.c"\r
+\r
+".\src\src_linear.obj" : ".\src\src_linear.c"\r
+    $(CPP) $(CFLAGS) /Fo".\src\src_linear.obj" /c ".\src\src_linear.c"\r
+\r
+".\src\src_zoh.obj" : ".\src\src_zoh.c"\r
+    $(CPP) $(CFLAGS) /Fo".\src\src_zoh.obj" /c ".\src\src_zoh.c"\r
+\r
+".\src\src_sinc.obj" : ".\src\src_sinc.c"\r
+    $(CPP) $(CFLAGS) /Fo".\src\src_sinc.obj" /c ".\src\src_sinc.c"\r
+\r
+#====================================================================\r
+# Object files for test programs.\r
+\r
+".\tests\util.obj" : ".\tests\util.c"\r
+    $(CPP) $(CFLAGS) /Fo".\tests\util.obj" /c ".\tests\util.c"\r
+\r
+".\tests\calc_snr.obj" : ".\tests\calc_snr.c"\r
+    $(CPP) $(CFLAGS) /Fo".\tests\calc_snr.obj" /c ".\tests\calc_snr.c"\r
+\r
+".\tests\dft_cmp.obj" : ".\tests\dft_cmp.c"\r
+    $(CPP) $(CFLAGS) /Fo".\tests\dft_cmp.obj" /c ".\tests\dft_cmp.c"\r
+\r
+#====================================================================\r
+# Test programs.\r
+\r
+".\tests\misc_test.exe" : ".\tests\misc_test.c" ".\tests\util.obj"\r
+    $(CPP) $(CFLAGS) /Fo".\tests\misc_test.obj" /c ".\tests\misc_test.c"\r
+    $(LINK32) $(PROG_LINK_FLAGS) /out:".\tests\misc_test.exe" ".\tests\misc_test.obj" ".\tests\util.obj" libsamplerate-0.lib\r
+\r
+".\tests\termination_test.exe" : ".\tests\termination_test.c" ".\tests\util.obj"\r
+    $(CPP) $(CFLAGS) /Fo".\tests\termination_test.obj" /c ".\tests\termination_test.c"\r
+    $(LINK32) $(PROG_LINK_FLAGS) /out:".\tests\termination_test.exe" ".\tests\termination_test.obj" ".\tests\util.obj" libsamplerate-0.lib\r
+\r
+".\tests\streaming_test.exe" : ".\tests\streaming_test.c" ".\tests\util.obj"\r
+    $(CPP) $(CFLAGS) /Fo".\tests\streaming_test.obj" /c ".\tests\streaming_test.c"\r
+    $(LINK32) $(PROG_LINK_FLAGS) /out:".\tests\streaming_test.exe" ".\tests\streaming_test.obj" ".\tests\util.obj" libsamplerate-0.lib\r
+\r
+".\tests\simple_test.exe" : ".\tests\simple_test.c" ".\tests\util.obj"\r
+    $(CPP) $(CFLAGS) /Fo".\tests\simple_test.obj" /c ".\tests\simple_test.c"\r
+    $(LINK32) $(PROG_LINK_FLAGS) /out:".\tests\simple_test.exe" ".\tests\simple_test.obj" ".\tests\util.obj" libsamplerate-0.lib\r
+\r
+".\tests\reset_test.exe" : ".\tests\reset_test.c" ".\tests\util.obj"\r
+    $(CPP) $(CFLAGS) /Fo".\tests\reset_test.obj" /c ".\tests\reset_test.c"\r
+    $(LINK32) $(PROG_LINK_FLAGS) /out:".\tests\reset_test.exe" ".\tests\reset_test.obj" ".\tests\util.obj" libsamplerate-0.lib\r
+\r
+".\tests\multi_channel_test.exe" : ".\tests\multi_channel_test.c" ".\tests\util.obj" ".\tests\calc_snr.obj"\r
+    $(CPP) $(CFLAGS) /Fo".\tests\multi_channel_test.obj" /c ".\tests\multi_channel_test.c"\r
+    $(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\r
+\r
+".\tests\snr_bw_test.exe" : ".\tests\snr_bw_test.c" ".\tests\util.obj"\r
+    $(CPP) $(CFLAGS) /Fo".\tests\snr_bw_test.obj" /c ".\tests\snr_bw_test.c"\r
+    $(LINK32) $(PROG_LINK_FLAGS) /out:".\tests\snr_bw_test.exe" ".\tests\snr_bw_test.obj" ".\tests\util.obj" libsamplerate-0.lib\r
+\r
+".\tests\throughput_test.exe" : ".\tests\throughput_test.c" ".\tests\util.obj"\r
+    $(CPP) $(CFLAGS) /Fo".\tests\throughput_test.obj" /c ".\tests\throughput_test.c"\r
+    $(LINK32) $(PROG_LINK_FLAGS) /out:".\tests\throughput_test.exe" ".\tests\throughput_test.obj" ".\tests\util.obj" libsamplerate-0.lib\r
+\r
+#====================================================================\r
+# Bit of extra trickery.\r
+\r
+sndfile.h libsndfile-1.dll libsndfile-1.def :\r
+       -@echo *---------------------------------------------------------------\r
+       -@echo * You need to get the pre-built Win32 binaries for libsndfile\r
+       -@echo * from : http://www.mega-nerd.com/libsndfile\r
+       -@echo * The prebuilt binaries will be in a ZIP file which contains\r
+       -@echo * the files :\r
+       -@echo * sndfile.h libsndfile-1.dll libsndfile-1.def\r
+       -@echo * which need to be copied to this directory.\r
+       -@echo *---------------------------------------------------------------\r
+       -@exit 1\r
+\r
+libsndfile-1.lib : libsndfile-1.dll libsndfile-1.def\r
+       lib /machine:i386 /def:libsndfile-1.def\r
+\r
+# End of Makefile\r
+#====================================================================\r
This page took 0.012187 seconds and 4 git commands to generate.