xbps/vars.mk
Juan RP a0b5e9e83a Rework Makefiles one more time.
- use printf to print commands rather than echo, which it may not have
  support for escape sequences (-e).
- Remove DESTDIR from SBINDIR, MANDIR, LIBDIR and INCLUDEDIR so that
  you can override it.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20100124125958-8mscedj5ntf288jd
2010-01-24 13:59:58 +01:00

34 lines
1003 B
Makefile

# Common variables.
PREFIX ?= /usr/local
SBINDIR ?= $(PREFIX)/sbin
LIBDIR ?= $(PREFIX)/lib
INCLUDEDIR ?= $(PREFIX)/include
MANDIR ?= $(PREFIX)/share/man
TOPDIR ?= ..
INSTALL_STRIPPED ?= -s
# To build the libxbps API documentation, requires graphviz and doxygen.
# Uncomment this to enable.
#BUILD_API_DOCS = 1
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
ifdef DEBUG
INSTALL_STRIPPED =
DEBUG_FLAGS = -g
CPPFLAGS += -DDEBUG
endif
WARNFLAGS = -pedantic -std=c99 -Wall -Wextra -Werror -Wshadow -Wformat=2
WARNFLAGS += -Wmissing-declarations -Wcomment -Wunused-macros -Wendif-labels
WARNFLAGS += -Wcast-qual -Wcast-align -Wstack-protector
CFLAGS = $(DEBUG_FLAGS) $(WARNFLAGS) -fPIC -DPIC -fstack-protector-all
SHAREDLIB_CFLAGS = -fvisibility=default
# Grr, hate the static libs!
STATIC_LIBS = -lprop -lpthread -larchive -lssl -lcrypto -ldl -lacl
STATIC_LIBS += -lattr -llzma -lbz2 -lz