Merge pull request #51 from tyll/ldflags

Fix LDFLAGS
This commit is contained in:
rofl0r 2015-03-22 19:34:09 +01:00
commit d461f397b2
2 changed files with 5 additions and 3 deletions

View File

@ -25,7 +25,7 @@ GENH = src/version.h
CFLAGS += -Wall -O0 -g -std=c99 -D_GNU_SOURCE -pipe
NO_AS_NEEDED = -Wl,--no-as-needed
LIBDL = -ldl
LDFLAGS = -shared -fPIC $(NO_AS_NEEDED) $(LIBDL) -lpthread
LDFLAGS = -fPIC $(NO_AS_NEEDED)
INC =
PIC = -fPIC
AR = $(CROSS_COMPILE)ar
@ -46,6 +46,7 @@ ALL_CONFIGS = src/proxychains.conf
-include config.mak
CFLAGS+=$(USER_CFLAGS) $(MAC_CFLAGS)
LDFLAGS+=$(USER_LDFLAGS)
CFLAGS_MAIN=-DLIB_DIR=\"$(libdir)\" -DSYSCONFDIR=\"$(sysconfdir)\" -DDLL_NAME=\"$(LDSO_PATHNAME)\"
@ -81,10 +82,10 @@ src/version.o: src/version.h
$(CC) $(CPPFLAGS) $(CFLAGS) $(CFLAGS_MAIN) $(INC) $(PIC) -c -o $@ $<
$(LDSO_PATHNAME): $(LOBJS)
$(CC) $(LDFLAGS) $(LD_SET_SONAME)$(LDSO_PATHNAME) -o $@ $(LOBJS)
$(CC) -shared -lpthread $(LIBDL) $(LDFLAGS) $(LD_SET_SONAME)$(LDSO_PATHNAME) -o $@ $(LOBJS)
$(ALL_TOOLS): $(OBJS)
$(CC) src/main.o src/common.o -o $(PXCHAINS)
$(CC) $(LDFLAGS) src/main.o src/common.o -o $(PXCHAINS)
.PHONY: all clean install install-config install-libs install-tools

1
configure vendored
View File

@ -83,6 +83,7 @@ fi
echo CC?=$CC>config.mak
[ -z "$CPPFLAGS" ] || echo CPPFLAGS?=$CPPFLAGS>>config.mak
[ -z "$CFLAGS" ] || echo USER_CFLAGS?=$CFLAGS>>config.mak
[ -z "$LDFLAGS" ] || echo USER_LDFLAGS?=$LDFLAGS>>config.mak
echo prefix=$prefix>>config.mak
echo exec_prefix=$exec_prefix>>config.mak
echo bindir=$bindir>>config.mak