mirror of
https://github.com/rofl0r/proxychains-ng
synced 2025-03-18 11:57:20 +08:00
in ce655fdac82ed843b94a1f1a176475e9dbe432c1 the getnameinfo function was factored into a separate TU to prevent its POSIX signature from colliding with GLIBC's wrong prototype. since this has been fixed in GLIBC 10 years ago, it should be safe by now. undoing the workaround has the advantage that all hooked functions are now available in the same place, which is a prerequisite for a change i'm about to commit. if it turns out there's still systems in use that use the old GLIBC version with the wrong prototype, we can add a configure check dealing with it.
102 lines
2.4 KiB
Makefile
102 lines
2.4 KiB
Makefile
#
|
|
# Makefile for proxychains (requires GNU make), stolen from musl
|
|
#
|
|
# Use config.mak to override any of the following variables.
|
|
# Do not make changes here.
|
|
#
|
|
|
|
exec_prefix = /usr/local
|
|
bindir = $(exec_prefix)/bin
|
|
|
|
prefix = /usr/local/
|
|
includedir = $(prefix)/include
|
|
libdir = $(prefix)/lib
|
|
sysconfdir=$(prefix)/etc
|
|
|
|
OBJS = src/common.o src/main.o
|
|
|
|
DOBJS = src/daemon/hsearch.o \
|
|
src/daemon/sblist.o src/daemon/sblist_delete.o \
|
|
src/daemon/daemon.o src/daemon/udpserver.o
|
|
|
|
LOBJS = src/version.o \
|
|
src/core.o src/common.o src/libproxychains.o \
|
|
src/allocator_thread.o src/rdns.o \
|
|
src/hostsreader.o src/hash.o src/debug.o
|
|
|
|
|
|
GENH = src/version.h
|
|
|
|
CFLAGS += -Wall -O0 -g -std=c99 -D_GNU_SOURCE -pipe
|
|
NO_AS_NEEDED = -Wl,--no-as-needed
|
|
LIBDL = -ldl
|
|
LDFLAGS = -fPIC $(NO_AS_NEEDED) $(LIBDL) $(PTHREAD)
|
|
INC =
|
|
PIC = -fPIC
|
|
AR = $(CROSS_COMPILE)ar
|
|
RANLIB = $(CROSS_COMPILE)ranlib
|
|
SOCKET_LIBS =
|
|
|
|
LDSO_SUFFIX = so
|
|
LD_SET_SONAME = -Wl,-soname=
|
|
INSTALL = ./tools/install.sh
|
|
|
|
LDSO_PATHNAME = libproxychains4.$(LDSO_SUFFIX)
|
|
|
|
SHARED_LIBS = $(LDSO_PATHNAME)
|
|
ALL_LIBS = $(SHARED_LIBS)
|
|
PXCHAINS = proxychains4
|
|
PXCHAINS_D = proxychains4-daemon
|
|
ALL_TOOLS = $(PXCHAINS) $(PXCHAINS_D)
|
|
ALL_CONFIGS = src/proxychains.conf
|
|
|
|
-include config.mak
|
|
|
|
CFLAGS+=$(USER_CFLAGS) $(MAC_CFLAGS)
|
|
CFLAGS_MAIN=-DLIB_DIR=\"$(libdir)\" -DSYSCONFDIR=\"$(sysconfdir)\" -DDLL_NAME=\"$(LDSO_PATHNAME)\"
|
|
|
|
|
|
all: $(ALL_LIBS) $(ALL_TOOLS)
|
|
|
|
install: install-libs install-tools
|
|
|
|
$(DESTDIR)$(bindir)/%: %
|
|
$(INSTALL) -D -m 755 $< $@
|
|
|
|
$(DESTDIR)$(libdir)/%: %
|
|
$(INSTALL) -D -m 644 $< $@
|
|
|
|
$(DESTDIR)$(sysconfdir)/%: src/%
|
|
$(INSTALL) -D -m 644 $< $@
|
|
|
|
install-libs: $(ALL_LIBS:%=$(DESTDIR)$(libdir)/%)
|
|
install-tools: $(ALL_TOOLS:%=$(DESTDIR)$(bindir)/%)
|
|
install-config: $(ALL_CONFIGS:src/%=$(DESTDIR)$(sysconfdir)/%)
|
|
|
|
clean:
|
|
rm -f $(ALL_LIBS)
|
|
rm -f $(ALL_TOOLS)
|
|
rm -f $(OBJS) $(LOBJS) $(DOBJS)
|
|
rm -f $(GENH)
|
|
|
|
src/version.h: $(wildcard VERSION .git)
|
|
printf '#define VERSION "%s"\n' "$$(sh tools/version.sh)" > $@
|
|
|
|
src/version.o: src/version.h
|
|
|
|
%.o: %.c
|
|
$(CC) $(CPPFLAGS) $(CFLAGS) $(CFLAGS_MAIN) $(INC) $(PIC) -c -o $@ $<
|
|
|
|
$(LDSO_PATHNAME): $(LOBJS)
|
|
$(CC) $(LDFLAGS) $(LD_SET_SONAME)$(LDSO_PATHNAME) $(USER_LDFLAGS) \
|
|
-shared -o $@ $^ $(SOCKET_LIBS)
|
|
|
|
$(PXCHAINS): $(OBJS)
|
|
$(CC) $^ $(USER_LDFLAGS) $(LIBDL) -o $@
|
|
|
|
$(PXCHAINS_D): $(DOBJS)
|
|
$(CC) $^ $(USER_LDFLAGS) -o $@
|
|
|
|
|
|
.PHONY: all clean install install-config install-libs install-tools
|