Add conditional source and libraries for mingw build.
authorRalph Giles <giles@mozilla.com>
Fri, 1 Mar 2013 21:50:21 +0000 (13:50 -0800)
committerRalph Giles <giles@mozilla.com>
Fri, 1 Mar 2013 21:50:21 +0000 (13:50 -0800)
unix/Makefile

index 0a8248f..973a66a 100644 (file)
@@ -44,6 +44,11 @@ ifeq ($(findstring -DOP_HAVE_LRINTF,${CFLAGS}),-DOP_HAVE_LRINTF)
 LIBS := -lm $(LIBS)
 endif
 
+# Extras for the MS target
+ifneq ($(findstring mingw,${CC}),)
+LIBS += -lwsock32 -lws2_32 -lgdi32 -lcrypt32
+endif
+
 RANLIB ?= ranlib
 
 #TODO: tests
@@ -64,6 +69,10 @@ internal.c \
 opusfile.c \
 stream.c \
 
+ifneq ($(findstring mingw,${CC}),)
+LIBOPUSFILE_CSOURCES += wincerts.c
+endif
+
 LIBOPUSFILE_CHEADERS = \
 internal.h \