diff options
author | Leah Neukirchen <leah@vuxu.org> | 2017-05-27 23:51:48 +0200 |
---|---|---|
committer | Leah Neukirchen <leah@vuxu.org> | 2017-05-27 23:51:48 +0200 |
commit | 1fbebe4d166b036e7d5427775ef3239addcffb2f (patch) | |
tree | 5ae9e8e3a6643de74ebca47934f0ba24e5aea12f | |
parent | 7b5533f518cad3cc7eadb3b39b2eb587ec012f2c (diff) | |
download | mblaze-1fbebe4d166b036e7d5427775ef3239addcffb2f.tar.gz mblaze-1fbebe4d166b036e7d5427775ef3239addcffb2f.tar.xz mblaze-1fbebe4d166b036e7d5427775ef3239addcffb2f.zip |
GNUmakefile: detect OS
-rw-r--r-- | GNUmakefile | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/GNUmakefile b/GNUmakefile index 9713e26..f598f4f 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -1,12 +1,17 @@ -.error : This Makefile needs GNU make - CFLAGS+=-g -O2 -Wall -Wno-switch -Wextra -fstack-protector-strong -D_FORTIFY_SOURCE=2 LDLIBS=-lrt -ifdef OPENBSD + +OS := $(shell uname) + +ifeq ($(OS),OpenBSD) CFLAGS+=-I/usr/local/include -pthread LDLIBS=-L/usr/local/lib -liconv -pthread endif +ifeq ($(OS),Darwin) +LDLIBS=-liconv +endif + DESTDIR= PREFIX=/usr/local BINDIR=$(PREFIX)/bin |