7aebea684b
libfetch from NetBSD's pkgsrc has been imported into lib/fetch, but the objects are embedded into libxbps. Only a public function to fetch files has been implemented: xbps_fetch_file(). The library now is built with -fvisibility=hidden by default, and exported symbols are the ones that use the SYMEXPORT macro. The code works well enough, but will need many more cleanups. --HG-- extra : convert_revision : xtraeme%40gmail.com-20091027004600-0lq9aao67lisbzxv
23 lines
744 B
Makefile
23 lines
744 B
Makefile
# Common variables.
|
|
|
|
PREFIX ?= /usr/local
|
|
SBINDIR ?= $(DESTDIR)$(PREFIX)/sbin
|
|
LIBDIR ?= $(DESTDIR)$(PREFIX)/lib
|
|
TOPDIR ?= ..
|
|
INSTALL_STRIPPED ?= -s
|
|
|
|
ifdef DEBUG
|
|
INSTALL_STRIPPED=
|
|
DEBUG_FLAGS = -g
|
|
endif
|
|
|
|
STATIC_LIBS ?= -lprop -lpthread -larchive
|
|
LDFLAGS += -L$(TOPDIR)/lib -L$(PREFIX)/lib -lxbps
|
|
CPPFLAGS += -I$(TOPDIR)/include -D_XOPEN_SOURCE=600 -D_GNU_SOURCE
|
|
CPPFLAGS += -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGE_FILES
|
|
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) -fstack-protector-all -O2 -fPIC -DPIC
|
|
CFLAGS += -fvisibility=hidden
|