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