diff --git a/Makefile.am b/Makefile.am
index 68e03007d0ef143e2f965c7899b2b1f73397b994..0ee3030f20d46f949121bbb742248d15154fd48a 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -12,15 +12,13 @@ libopusfile_la_SOURCES = \
 	src/http.c src/info.c \
 	src/internal.c src/internal.h \
 	src/opusfile.c src/stream.c
-if OS_WIN32
-libopusfile_la_SOURCES += src/wsockwrapper.c
-endif
 libopusfile_la_LIBADD = $(DEPS_LIBS)
+libopusfile_la_LDFLAGS = -no-undefined \
+ -version-info @OP_LT_CURRENT@:@OP_LT_REVISION@:@OP_LT_AGE@
 if OS_WIN32
+libopusfile_la_SOURCES += src/wsockwrapper.c
 libopusfile_la_LIBADD += -lws2_32
 endif
-libopusfile_la_LDFLAGS = -no-undefined \
- -version-info @OP_LT_CURRENT@:@OP_LT_REVISION@:@OP_LT_AGE@
 
 noinst_PROGRAMS = examples/opusfile_example examples/seeking_example