diff options
author | Sijmen J. Mulder <ik@sjmulder.nl> | 2018-07-13 22:59:40 +0200 |
---|---|---|
committer | Sijmen J. Mulder <ik@sjmulder.nl> | 2018-07-13 22:59:40 +0200 |
commit | 991e3c75ab41ccaee41ceefc8b36853e2655b527 (patch) | |
tree | 9a0413c6c642b512dc66f72deb04c0315e476e7b /src/Makefile | |
parent | a5d2c5ade2a23a788ddb0577161bdfffa9776c26 (diff) | |
parent | f2a9e957d1a174630ba1e726653c1fa10c31af8b (diff) |
Merge branch 'freeze' into openbsd
Diffstat (limited to 'src/Makefile')
-rwxr-xr-x | src/Makefile | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/src/Makefile b/src/Makefile index 841c79e..c90aa95 100755 --- a/src/Makefile +++ b/src/Makefile @@ -87,18 +87,16 @@ ifneq (, $(shell which gnuplot)) CFLAGS += -DGNUPLOT endif -# dynamic linking (not available in FreeBSD and OpenBSD) -ifneq ($(shell uname -s),FreeBSD) - ifneq ($(shell uname -s),OpenBSD) - LDLIBS += -ldl - endif -endif - # OpenBSD does not implement wordexp() ifeq ($(shell uname -s),OpenBSD) CFLAGS += -DNO_WORDEXP endif +# dynamic linking (not available in BSD) +ifneq ($(shell uname -s | grep -o BSD),BSD) + LDLIBS += -ldl +endif + ifneq (, $(shell which pkg-config)) # Any system with pkg-config @@ -140,6 +138,16 @@ else ifeq ($(shell uname -s),Darwin) # macOS' ncurses is built with wide-char support LDFLAGS += -lncurses +else ifeq ($(shell uname -s),NetBSD) + # NetBSD without pkg-config + + CFLAGS += -I/usr/pkg/include + CFLAGS += -I/usr/pkg/include/ncursesw + + LDFLAGS += -L/usr/pkg/lib + LDFLAGS += -Wl,-R/usr/pkg/lib + + LDLIBS += -lncursesw endif OBJS = $(patsubst %.c, %.o, $(wildcard *.c) $(wildcard utils/*.c)) gram.o |