2009-08-17 22:37:20 +05:30
|
|
|
# Common variables.
|
|
|
|
|
2009-08-18 21:07:42 +05:30
|
|
|
PREFIX ?=
|
2009-08-18 04:41:48 +05:30
|
|
|
SBINDIR ?= $(DESTDIR)$(PREFIX)/sbin
|
|
|
|
LIBDIR ?= $(DESTDIR)$(PREFIX)/lib
|
2009-08-18 21:07:42 +05:30
|
|
|
SHAREDIR ?= $(PREFIX)/usr/share/xbps/shutils
|
2009-08-18 19:34:34 +05:30
|
|
|
ETCDIR ?= $(PREFIX)/etc
|
2009-08-17 22:37:20 +05:30
|
|
|
TOPDIR ?= ..
|
|
|
|
INSTALL_STRIPPED ?= -s
|
|
|
|
|
|
|
|
LDFLAGS += -L$(TOPDIR)/lib -L$(PREFIX)/lib -lxbps
|
|
|
|
CPPFLAGS += -I$(TOPDIR)/include -D_BSD_SOURCE -D_XOPEN_SOURCE=600
|
|
|
|
CPPFLAGS += -D_GNU_SOURCE
|
|
|
|
WARNFLAGS ?= -pedantic -std=c99 -Wall -Wextra -Werror -Wshadow -Wformat=2
|
|
|
|
WARNFLAGS += -Wmissing-declarations -Wcomment -Wunused-macros -Wendif-labels
|
|
|
|
WARNFLAGS += -Wcast-qual -Wcast-align -Wconversion
|
|
|
|
CFLAGS += $(WARNFLAGS) -O2 -fPIC -DPIC
|