2009-08-17 22:37:20 +05:30
|
|
|
# Common variables.
|
|
|
|
|
2010-01-24 18:29:58 +05:30
|
|
|
PREFIX ?= /usr/local
|
|
|
|
SBINDIR ?= $(PREFIX)/sbin
|
|
|
|
LIBDIR ?= $(PREFIX)/lib
|
|
|
|
INCLUDEDIR ?= $(PREFIX)/include
|
|
|
|
MANDIR ?= $(PREFIX)/share/man
|
|
|
|
TOPDIR ?= ..
|
2009-08-17 22:37:20 +05:30
|
|
|
INSTALL_STRIPPED ?= -s
|
|
|
|
|
2010-01-23 07:07:19 +05:30
|
|
|
# To build the libxbps API documentation, requires graphviz and doxygen.
|
|
|
|
# Uncomment this to enable.
|
|
|
|
#BUILD_API_DOCS = 1
|
|
|
|
|
2010-04-20 17:52:38 +05:30
|
|
|
# Uncomment this to build and link from an external proplib.
|
|
|
|
#USE_EXTERNAL_PROPLIB = 1
|
|
|
|
|
2010-01-06 15:45:56 +05:30
|
|
|
LDFLAGS = -L$(TOPDIR)/lib
|
|
|
|
CPPFLAGS = -I$(TOPDIR)/include -D_XOPEN_SOURCE=600 -D_GNU_SOURCE
|
|
|
|
CPPFLAGS += -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGE_FILES
|
|
|
|
|
2010-04-20 17:52:38 +05:30
|
|
|
ifndef USE_EXTERNAL_PROPLIB
|
|
|
|
CPPFLAGS += -I$(TOPDIR)/lib/portableproplib
|
|
|
|
else
|
|
|
|
STATIC_PROPLIB = -lprop
|
|
|
|
endif
|
|
|
|
|
2009-10-16 19:44:19 +05:30
|
|
|
ifdef DEBUG
|
2010-01-24 18:29:58 +05:30
|
|
|
INSTALL_STRIPPED =
|
2009-10-16 19:44:19 +05:30
|
|
|
DEBUG_FLAGS = -g
|
2009-10-31 19:39:25 +05:30
|
|
|
CPPFLAGS += -DDEBUG
|
2009-10-16 19:44:19 +05:30
|
|
|
endif
|
|
|
|
|
2010-04-20 17:52:38 +05:30
|
|
|
WARNFLAGS = -std=c99 -Wall -Wextra -Werror -Wshadow -Wformat=2
|
2009-08-17 22:37:20 +05:30
|
|
|
WARNFLAGS += -Wmissing-declarations -Wcomment -Wunused-macros -Wendif-labels
|
2009-11-18 14:35:45 +05:30
|
|
|
WARNFLAGS += -Wcast-qual -Wcast-align -Wstack-protector
|
2010-01-06 15:45:56 +05:30
|
|
|
CFLAGS = $(DEBUG_FLAGS) $(WARNFLAGS) -fPIC -DPIC -fstack-protector-all
|
2010-01-21 07:40:19 +05:30
|
|
|
SHAREDLIB_CFLAGS = -fvisibility=default
|
2009-10-30 16:47:26 +05:30
|
|
|
|
2009-11-19 10:33:37 +05:30
|
|
|
# Grr, hate the static libs!
|
2010-04-20 17:52:38 +05:30
|
|
|
STATIC_LIBS = -lz $(STATIC_PROPLIB) -lpthread
|
2010-03-31 16:20:31 +05:30
|
|
|
STATIC_LIBS += `pkg-config openssl --libs --static`
|
|
|
|
STATIC_LIBS += `pkg-config libarchive --libs --static`
|