compat: make Makefile more flexible

This commit is contained in:
~locpyl-tidnyd 2021-03-31 10:29:45 +00:00
parent 85030ab72d
commit 8df8f654b2
2 changed files with 3 additions and 5 deletions

View File

@ -9,9 +9,7 @@ worker = $(wildcard worker/*.c)
tests = $(wildcard tests/*.c)
bench = $(wildcard bench/*.c)
ifdef compat
compat := $(wildcard compat/$(compat)/*.c)
endif
compat := $(foreach dir,$(compat),$(wildcard compat/$(dir)/*.c))
common = $(jets) $(noun) $(ur) $(vere) $(compat)
headers = $(shell find include -type f)

4
pkg/urbit/configure vendored
View File

@ -119,7 +119,7 @@ popd
ldextra="$ldextra -lzstd"
# libuv implibs
ldextra="$ldextra -luserenv -liphlpapi -lpsapi"
vcompat="compat = mingw"
vcompat=mingw
CFLAGS="${CFLAGS-} ${cdirs[@]} -DCURL_STATICLIB -DH2O_NO_UNIX_SOCKETS -Icompat/mingw"
LDFLAGS="${LDFLAGS-} -static ${ldirs[@]}"
PKG_CONFIG="echo"
@ -162,7 +162,7 @@ cat >config.mk <<EOF
CFLAGS := ${CFLAGS-} -funsigned-char -ffast-math -fcommon -std=gnu99
LDFLAGS := $LDFLAGS ${ldextra-}
CC := ${CC-cc}
${vcompat-}
compat := ${vcompat-posix}
EOF
echo == config.mk == >&2