diff --git a/Makefile b/Makefile index 88b61fc..6332497 100644 --- a/Makefile +++ b/Makefile @@ -30,12 +30,15 @@ # other than his own. # --include config.mk +include config.mk .SUFFIXES: .SUFFIXES: .o .c -PREFIX ?= /usr/local +CFLAGS += -Wall -Werror +CFLAGS += -Iinclude +CFLAGS += -fPIC + includedir = $(DESTDIR)$(PREFIX)/include libdir = $(DESTDIR)$(PREFIX)/lib @@ -51,14 +54,6 @@ srcs += linkmap.c objs = $(srcs:.c=.o) -CFLAGS += -Wall -Werror -CFLAGS += -Iinclude -CFLAGS += -fPIC - -# Comment this if on NetBSD or OpenBSD -LIBS += -lmd -LIBS += -lpthread - all: libhaggis.a libhaggis.so shared: libhaggis.so diff --git a/README.md b/README.md index 58a78e7..c7c3a7a 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,9 @@ in mind, being developed simultaneously on FreeBSD and Linux. It is implemented a library and by default both shared and static versions will be built. ## Building +Do a quick check of **config.mk** to be ensure the variables set therein work +for your system, and edit as needed. + SeaHag is built using a portable Makefile which works with both BSD and GNU Make. Due to the limited subset of features used it *may* be portable to other versions of Make, but that is untested as is the code on systems other than BSD or Linux. diff --git a/test/Makefile b/test/Makefile index 0e79a79..1327610 100644 --- a/test/Makefile +++ b/test/Makefile @@ -30,9 +30,11 @@ # other than his own. # +include ../config.mk + CFLAGS += -I../include LDLIBS += ../libhaggis.a -LDLIBS += -lmd +LDLIBS += $(LIBS) tests += store_u16 tests += load_u16 diff --git a/test/linkmap_put.c b/test/linkmap_put.c index 115f110..8b30e2d 100644 --- a/test/linkmap_put.c +++ b/test/linkmap_put.c @@ -26,7 +26,6 @@ int main() { path = haggis_linkmap_get_or_add(map, s0.st_ino, tgt); assert(path == NULL); path = haggis_linkmap_get_or_add(map, s1.st_ino, lnk); - //printf("\nPath: %s\n", path); assert(memcmp(path, tgt, 9) == 0); haggis_linkmap_deinit(map); unlink(lnk);