proxychains-ng/Makefile

76 lines
1.8 KiB
Makefile
Raw Normal View History

#
# 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
2012-01-30 17:26:38 +00:00
sysconfdir=$(prefix)/etc
SRCS = $(sort $(wildcard src/*.c))
OBJS = $(SRCS:.c=.o)
LOBJS = src/nameinfo.o \
src/core.o src/common.o src/libproxychains.o src/shm.o \
src/allocator_thread.o src/ip_type.o src/stringdump.o \
src/hostentdb.o src/hash.o
CFLAGS += -Wall -O0 -g -std=c99 -D_GNU_SOURCE -pipe
2012-12-16 01:39:28 +00:00
NO_AS_NEEDED = -Wl,--no-as-needed
2012-12-25 18:08:05 +00:00
LIBDL = -ldl
LDFLAGS = -shared -fPIC $(NO_AS_NEEDED) $(LIBDL) -lpthread
INC =
2012-01-24 06:29:34 +00:00
PIC = -fPIC
AR = $(CROSS_COMPILE)ar
RANLIB = $(CROSS_COMPILE)ranlib
LDSO_SUFFIX = so
2012-01-27 19:48:24 +00:00
LD_SET_SONAME = -Wl,-soname=
INSTALL_FLAGS = -D -m
LDSO_PATHNAME = libproxychains4.$(LDSO_SUFFIX)
SHARED_LIBS = $(LDSO_PATHNAME)
ALL_LIBS = $(SHARED_LIBS)
PXCHAINS = proxychains4
ALL_TOOLS = $(PXCHAINS)
-include config.mak
2012-01-27 19:48:24 +00:00
CFLAGS+=$(USER_CFLAGS) $(MAC_CFLAGS)
2012-01-30 17:29:35 +00:00
CFLAGS_MAIN=-DLIB_DIR=\"$(libdir)\" -DSYSCONFDIR=\"$(sysconfdir)\" -DDLL_NAME=\"$(LDSO_PATHNAME)\"
all: $(ALL_LIBS) $(ALL_TOOLS)
install-config:
install -d $(DESTDIR)/$(sysconfdir)
install $(INSTALL_FLAGS) 644 src/proxychains.conf $(DESTDIR)/$(sysconfdir)/
install:
install -d $(DESTDIR)/$(bindir)/ $(DESTDIR)/$(libdir)/
2012-03-07 17:02:37 +00:00
install $(INSTALL_FLAGS) 755 $(ALL_TOOLS) $(DESTDIR)/$(bindir)/
install $(INSTALL_FLAGS) 644 $(ALL_LIBS) $(DESTDIR)/$(libdir)/
clean:
2012-01-24 06:29:34 +00:00
rm -f $(ALL_LIBS)
rm -f $(ALL_TOOLS)
rm -f $(OBJS)
%.o: %.c
$(CC) $(CFLAGS) $(CFLAGS_MAIN) $(INC) $(PIC) -c -o $@ $<
$(LDSO_PATHNAME): $(LOBJS)
2012-01-27 19:48:24 +00:00
$(CC) $(LDFLAGS) $(LD_SET_SONAME)$(LDSO_PATHNAME) -o $@ $(LOBJS)
$(ALL_TOOLS): $(OBJS)
$(CC) src/main.o src/common.o -o $(PXCHAINS)
2013-01-06 18:33:34 +00:00
.PHONY: all clean install install-config