Move certain vars into config.mk
This commit is contained in:
parent
f05040ff2b
commit
d8379df818
4 changed files with 11 additions and 12 deletions
15
Makefile
15
Makefile
|
@ -30,12 +30,15 @@
|
||||||
# other than his own.
|
# other than his own.
|
||||||
#
|
#
|
||||||
|
|
||||||
-include config.mk
|
include config.mk
|
||||||
|
|
||||||
.SUFFIXES:
|
.SUFFIXES:
|
||||||
.SUFFIXES: .o .c
|
.SUFFIXES: .o .c
|
||||||
|
|
||||||
PREFIX ?= /usr/local
|
CFLAGS += -Wall -Werror
|
||||||
|
CFLAGS += -Iinclude
|
||||||
|
CFLAGS += -fPIC
|
||||||
|
|
||||||
includedir = $(DESTDIR)$(PREFIX)/include
|
includedir = $(DESTDIR)$(PREFIX)/include
|
||||||
libdir = $(DESTDIR)$(PREFIX)/lib
|
libdir = $(DESTDIR)$(PREFIX)/lib
|
||||||
|
|
||||||
|
@ -51,14 +54,6 @@ srcs += linkmap.c
|
||||||
|
|
||||||
objs = $(srcs:.c=.o)
|
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
|
all: libhaggis.a libhaggis.so
|
||||||
|
|
||||||
shared: libhaggis.so
|
shared: libhaggis.so
|
||||||
|
|
|
@ -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.
|
a library and by default both shared and static versions will be built.
|
||||||
|
|
||||||
## Building
|
## 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.
|
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
|
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.
|
of Make, but that is untested as is the code on systems other than BSD or Linux.
|
||||||
|
|
|
@ -30,9 +30,11 @@
|
||||||
# other than his own.
|
# other than his own.
|
||||||
#
|
#
|
||||||
|
|
||||||
|
include ../config.mk
|
||||||
|
|
||||||
CFLAGS += -I../include
|
CFLAGS += -I../include
|
||||||
LDLIBS += ../libhaggis.a
|
LDLIBS += ../libhaggis.a
|
||||||
LDLIBS += -lmd
|
LDLIBS += $(LIBS)
|
||||||
|
|
||||||
tests += store_u16
|
tests += store_u16
|
||||||
tests += load_u16
|
tests += load_u16
|
||||||
|
|
|
@ -26,7 +26,6 @@ int main() {
|
||||||
path = haggis_linkmap_get_or_add(map, s0.st_ino, tgt);
|
path = haggis_linkmap_get_or_add(map, s0.st_ino, tgt);
|
||||||
assert(path == NULL);
|
assert(path == NULL);
|
||||||
path = haggis_linkmap_get_or_add(map, s1.st_ino, lnk);
|
path = haggis_linkmap_get_or_add(map, s1.st_ino, lnk);
|
||||||
//printf("\nPath: %s\n", path);
|
|
||||||
assert(memcmp(path, tgt, 9) == 0);
|
assert(memcmp(path, tgt, 9) == 0);
|
||||||
haggis_linkmap_deinit(map);
|
haggis_linkmap_deinit(map);
|
||||||
unlink(lnk);
|
unlink(lnk);
|
||||||
|
|
Loading…
Add table
Reference in a new issue