]> git.meshlink.io Git - catta/blobdiff - src/Makefile.am
Fix compilation error caused by ACX_THREAD
[catta] / src / Makefile.am
index 5ce20e06719476460530944353661a3b5ca1e303..87a1bb73a1a7efcc4d3eb03ab3d7c38b6d7942fc 100644 (file)
@@ -53,7 +53,7 @@ libcatta_la_SOURCES = \
        browse-service.c \
        resolve-service.c \
        dns.c dns.h \
-       rr.c rr.h rr-util.h \
+       rr.c rr-util.h \
        log.c \
        browse-dns-server.c \
        fdutil.h fdutil.c \
@@ -75,12 +75,22 @@ if HAVE_PF_ROUTE
 libcatta_la_SOURCES += \
        iface-pfroute.c iface-pfroute.h
 else
+if WINDOWS
+libcatta_la_SOURCES += \
+       iface-windows.c iface-windows.h
+else
 libcatta_la_SOURCES += \
        iface-none.c
 endif
 endif
+endif
 
-libcatta_la_CFLAGS = $(AM_CFLAGS) $(PTHREAD_CFLAGS)
+if WINDOWS
+# require Windows Vista or above (for winsock2)
+AM_CFLAGS+=-DWINVER=0x0600 -D_WIN32_WINNT=0x0600
+endif
+
+libcatta_la_CFLAGS = $(AM_CFLAGS) $(PTHREAD_CFLAGS) -fPIC
 libcatta_la_LIBADD = $(AM_LDADD) $(PTHREAD_CFLAGS) $(PTHREAD_LIBS)
 libcatta_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(LIBCATTA_VERSION_INFO)
 
@@ -88,6 +98,6 @@ if WINDOWS
 libcatta_la_SOURCES += \
        compat/windows/wincompat.c \
        compat/windows/wincompat.h
-libcatta_la_LIBADD += -lws2_32
+libcatta_la_LIBADD += -lws2_32 -liphlpapi
+libcatta_la_LDFLAGS += -no-undefined -Wl,--kill-at,--output-def=.libs/libcatta-0.def
 endif
-