2009-08-17 22:37:20 +05:30
|
|
|
# Common variables.
|
|
|
|
|
2009-10-30 16:47:26 +05:30
|
|
|
WITH_INET6 = yes
|
|
|
|
WITH_SSL = yes
|
|
|
|
|
2009-08-21 16:17:59 +05:30
|
|
|
PREFIX ?= /usr/local
|
2009-08-18 04:41:48 +05:30
|
|
|
SBINDIR ?= $(DESTDIR)$(PREFIX)/sbin
|
|
|
|
LIBDIR ?= $(DESTDIR)$(PREFIX)/lib
|
2009-10-28 21:02:22 +05:30
|
|
|
MANDIR ?= $(DESTDIR)$(PREFIX)/share/man/man8
|
2009-08-17 22:37:20 +05:30
|
|
|
TOPDIR ?= ..
|
|
|
|
INSTALL_STRIPPED ?= -s
|
|
|
|
|
2009-10-16 19:44:19 +05:30
|
|
|
ifdef DEBUG
|
|
|
|
INSTALL_STRIPPED=
|
|
|
|
DEBUG_FLAGS = -g
|
2009-10-31 19:39:25 +05:30
|
|
|
CPPFLAGS += -DDEBUG
|
2009-10-16 19:44:19 +05:30
|
|
|
endif
|
|
|
|
|
2009-10-30 16:47:26 +05:30
|
|
|
LDFLAGS = -L$(TOPDIR)/lib
|
2009-10-22 18:18:33 +05:30
|
|
|
CPPFLAGS += -I$(TOPDIR)/include -D_XOPEN_SOURCE=600 -D_GNU_SOURCE
|
2009-10-27 06:16:00 +05:30
|
|
|
CPPFLAGS += -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGE_FILES
|
2009-08-17 22:37:20 +05:30
|
|
|
WARNFLAGS ?= -pedantic -std=c99 -Wall -Wextra -Werror -Wshadow -Wformat=2
|
|
|
|
WARNFLAGS += -Wmissing-declarations -Wcomment -Wunused-macros -Wendif-labels
|
2009-10-30 16:47:26 +05:30
|
|
|
WARNFLAGS += -Wcast-qual -Wcast-align
|
|
|
|
CFLAGS = $(DEBUG_FLAGS) $(WARNFLAGS)
|
|
|
|
|
|
|
|
ifdef STATIC
|
|
|
|
CFLAGS += -static
|
|
|
|
LDFLAGS += -lprop -lpthread -larchive -lssl -lcrypto -ldl -lacl \
|
|
|
|
-lattr -lcrypto -llzma -lbz2 -lz
|
|
|
|
else
|
|
|
|
CFLAGS += -fvisibility=hidden -fstack-protector-all -fPIC -DPIC
|
|
|
|
CPPFLAGS += -Wstack-protector
|
|
|
|
endif
|