Add conditional LDLIBS for openbsd
This commit is contained in:
parent
d8e032d4b1
commit
637bb0f697
9
Makefile
9
Makefile
@ -34,13 +34,20 @@ else
|
||||
CWARN += -Wno-missing-field-initializers
|
||||
endif
|
||||
|
||||
OSFLAGS != case $$(uname -s) in *BSD|Darwin) echo '-D_BSD_SOURCE';; Linux) echo '-D_GNU_SOURCE';; *) echo '-D_DEFAULT_SOURCE';; esac
|
||||
OS := $(shell uname -s)
|
||||
|
||||
OSFLAGS != case $(OS) in *BSD|Darwin) echo '-D_BSD_SOURCE';; Linux) echo '-D_GNU_SOURCE';; *) echo '-D_DEFAULT_SOURCE';; esac
|
||||
EXTRA=
|
||||
G=-ggdb
|
||||
O=-Og
|
||||
CFLAGS=$(CCONFIG) $(EXTRA) $(CWARN) $(G) $(O) $(OSFLAGS) $(LTO)
|
||||
CFLAGS_PLACEHOLDER="$$(printf '\033[2m<flags...>\033[m\n')"
|
||||
LDLIBS=-lgc -lcord -lm -lunistring -lgmp
|
||||
|
||||
ifeq ($(OS),OpenBSD)
|
||||
LDLIBS += -lpthread -lexecinfo
|
||||
endif
|
||||
|
||||
COMPILER_OBJS=$(patsubst %.c,%.o,$(wildcard src/*.c))
|
||||
STDLIB_OBJS=$(patsubst %.c,%.o,$(wildcard src/stdlib/*.c))
|
||||
TESTS=$(patsubst test/%.tm,test/results/%.tm.testresult,$(wildcard test/*.tm))
|
||||
|
Loading…
Reference in New Issue
Block a user