xbps/vars.mk
Juan RP f6ac35e110 vars.mk: change default PREFIX to /usr/local and conditionalize
SHAREDIR based on its value.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20090821104759-q010qay9i2dtoo3y
2009-08-21 12:47:59 +02:00

23 lines
686 B
Makefile

# Common variables.
PREFIX ?= /usr/local
SBINDIR ?= $(DESTDIR)$(PREFIX)/sbin
LIBDIR ?= $(DESTDIR)$(PREFIX)/lib
ifeq ($(PREFIX),/)
else ifeq ($(PREFIX),)
SHAREDIR ?= /usr/share/xbps/shutils
else
SHAREDIR ?= $(PREFIX)/share/xbps/shutils
endif
ETCDIR ?= $(PREFIX)/etc
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