diff --git a/codecs/Makefile b/codecs/Makefile
index 3fcfd88b1c2d0350c6ca4b9a976dd565b660f12a..f7bde5c50173034afc6d392a47127cf74164bea3 100644
--- a/codecs/Makefile
+++ b/codecs/Makefile
@@ -56,4 +56,6 @@ $(LIBG722):
 $(if $(filter codec_g722,$(EMBEDDED_MODS)),modules.link,codec_g722.so): $(LIBG722)
 
 codec_resample.o: ASTCFLAGS+=-I$(ASTTOPDIR)/main/libresample/include
-codec_resample.so: LIBS += $(ASTTOPDIR)/main/libresample/libresample.a
+ifneq ($(findstring $(OSARCH), mingw32 cygwin ),)
+  codec_resample.so: LIBS += $(ASTTOPDIR)/main/libresample/libresample.a
+endif