2009-08-17 22:37:20 +05:30
|
|
|
# Common variables.
|
|
|
|
|
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-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
|
|
|
|
endif
|
|
|
|
|
2009-10-16 03:52:34 +05:30
|
|
|
STATIC_LIBS ?= -lprop -lpthread -larchive
|
|
|
|
LDFLAGS += -L$(TOPDIR)/lib -L$(PREFIX)/lib -lxbps
|
2009-08-17 22:37:20 +05:30
|
|
|
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
|
2009-10-20 13:15:37 +05:30
|
|
|
WARNFLAGS += -Wcast-qual -Wcast-align -Wconversion -Wstack-protector
|
|
|
|
CFLAGS = $(DEBUG_FLAGS) $(WARNFLAGS) -fstack-protector-all -O2 -fPIC -DPIC
|