2009-08-17 19:07:20 +02:00
|
|
|
# Common variables.
|
|
|
|
|
2009-08-21 12:47:59 +02:00
|
|
|
PREFIX ?= /usr/local
|
2009-08-18 01:11:48 +02:00
|
|
|
SBINDIR ?= $(DESTDIR)$(PREFIX)/sbin
|
|
|
|
LIBDIR ?= $(DESTDIR)$(PREFIX)/lib
|
2009-08-17 19:07:20 +02:00
|
|
|
TOPDIR ?= ..
|
|
|
|
INSTALL_STRIPPED ?= -s
|
|
|
|
|
2009-10-16 16:14:19 +02:00
|
|
|
ifdef DEBUG
|
|
|
|
INSTALL_STRIPPED=
|
|
|
|
DEBUG_FLAGS = -g
|
|
|
|
endif
|
|
|
|
|
2009-10-16 00:22:34 +02:00
|
|
|
STATIC_LIBS ?= -lprop -lpthread -larchive
|
|
|
|
LDFLAGS += -L$(TOPDIR)/lib -L$(PREFIX)/lib -lxbps
|
2009-10-22 14:48:33 +02:00
|
|
|
CPPFLAGS += -I$(TOPDIR)/include -D_XOPEN_SOURCE=600 -D_GNU_SOURCE
|
2009-08-17 19:07:20 +02:00
|
|
|
WARNFLAGS ?= -pedantic -std=c99 -Wall -Wextra -Werror -Wshadow -Wformat=2
|
|
|
|
WARNFLAGS += -Wmissing-declarations -Wcomment -Wunused-macros -Wendif-labels
|
2009-10-20 09:45:37 +02:00
|
|
|
WARNFLAGS += -Wcast-qual -Wcast-align -Wconversion -Wstack-protector
|
|
|
|
CFLAGS = $(DEBUG_FLAGS) $(WARNFLAGS) -fstack-protector-all -O2 -fPIC -DPIC
|