|
|
@ -2,17 +2,23 @@ VERSION_INFO = 1:0:0 |
|
|
|
|
|
|
|
AM_CFLAGS = -g -O2 -Wall -Werror -Wno-deprecated-declarations -fno-strict-aliasing -std=gnu99 -D_GNU_SOURCE |
|
|
|
AM_CFLAGS += $(PTHREAD_CFLAGS) |
|
|
|
if !USE_SYSTEM_SHARED_LIB |
|
|
|
AM_CFLAGS += -I$(top_srcdir)/libev |
|
|
|
AM_CFLAGS += -I$(top_srcdir)/libudns |
|
|
|
AM_CFLAGS += -I$(top_srcdir)/libsodium/src/libsodium/include |
|
|
|
endif |
|
|
|
AM_CFLAGS += -I$(top_srcdir)/libipset/include |
|
|
|
AM_CFLAGS += -I$(top_srcdir)/libcork/include |
|
|
|
AM_CFLAGS += -I$(top_srcdir)/libsodium/src/libsodium/include |
|
|
|
|
|
|
|
SS_COMMON_LIBS = $(top_builddir)/libev/libev.la \
|
|
|
|
$(top_builddir)/libipset/libipset.la \
|
|
|
|
$(top_builddir)/libcork/libcork.la \
|
|
|
|
$(top_builddir)/libsodium/src/libsodium/libsodium.la \
|
|
|
|
$(INET_NTOP_LIB) |
|
|
|
SS_COMMON_LIBS = $(top_builddir)/libipset/libipset.la \
|
|
|
|
$(top_builddir)/libcork/libcork.la \
|
|
|
|
$(INET_NTOP_LIB) |
|
|
|
if USE_SYSTEM_SHARED_LIB |
|
|
|
SS_COMMON_LIBS += -lev -lsodium -lm |
|
|
|
else |
|
|
|
SS_COMMON_LIBS += $(top_builddir)/libev/libev.la \
|
|
|
|
$(top_builddir)/libsodium/src/libsodium/libsodium.la |
|
|
|
endif |
|
|
|
|
|
|
|
bin_PROGRAMS = ss-local ss-tunnel |
|
|
|
if !BUILD_WINCOMPAT |
|
|
@ -61,9 +67,15 @@ ss_local_LDADD = $(SS_COMMON_LIBS) |
|
|
|
ss_tunnel_LDADD = $(SS_COMMON_LIBS) |
|
|
|
ss_server_LDADD = $(SS_COMMON_LIBS) |
|
|
|
ss_manager_LDADD = $(SS_COMMON_LIBS) |
|
|
|
if USE_SYSTEM_SHARED_LIB |
|
|
|
ss_local_LDADD += -ludns |
|
|
|
ss_tunnel_LDADD += -ludns |
|
|
|
ss_server_LDADD += -ludns |
|
|
|
else |
|
|
|
ss_local_LDADD += $(top_builddir)/libudns/libudns.la |
|
|
|
ss_tunnel_LDADD += $(top_builddir)/libudns/libudns.la |
|
|
|
ss_server_LDADD += $(top_builddir)/libudns/libudns.la |
|
|
|
endif |
|
|
|
|
|
|
|
ss_local_CFLAGS = $(AM_CFLAGS) -DUDPRELAY_LOCAL |
|
|
|
ss_tunnel_CFLAGS = $(AM_CFLAGS) -DUDPRELAY_LOCAL -DUDPRELAY_TUNNEL |
|
|
@ -87,8 +99,12 @@ ss_redir_SOURCES = utils.c \ |
|
|
|
redir.c |
|
|
|
ss_redir_CFLAGS = $(AM_CFLAGS) -DUDPRELAY_REDIR -DUDPRELAY_LOCAL |
|
|
|
ss_redir_LDADD = $(SS_COMMON_LIBS) |
|
|
|
if USE_SYSTEM_SHARED_LIB |
|
|
|
ss_redir_LDADD += -ludns |
|
|
|
else |
|
|
|
ss_redir_LDADD += $(top_builddir)/libudns/libudns.la |
|
|
|
endif |
|
|
|
endif |
|
|
|
|
|
|
|
lib_LTLIBRARIES = libshadowsocks.la |
|
|
|
libshadowsocks_la_SOURCES = $(ss_local_SOURCES) |
|
|
|