-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
29 lines (22 loc) · 878 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
CWD ?= $(realpath $(CURDIR))
VERSION ?= 7.12
all: linux macos windows
linux: mongoose
$(MAKE) -C mongoose/examples/http-server example CC=musl-gcc CFLAGS_EXTRA="-static -s -Os"
mv mongoose/examples/http-server/example mongoose_$@
windows: mongoose
$(MAKE) -C mongoose/examples/http-server example \
CC="docker run --platform linux/amd64 --rm -v $(CWD):$(CWD) -w $(CWD)/mongoose/examples/http-server mdashnet/vc98 wine cl" \
CFLAGS="/MD /nologo /Os" \
CFLAGS_EXTRA="-UMG_ENABLE_IPV6" \
OUT=/Femongoose.exe
mv mongoose/examples/http-server/mongoose.exe .
macos: mongoose
$(MAKE) -C mongoose/examples/http-server example CFLAGS_EXTRA="-Os"
mv mongoose/examples/http-server/example mongoose_$@
version:
echo $(VERSION)
mongoose:
git clone --depth 1 -b $(VERSION) https://github.com/cesanta/mongoose $@
clean:
rm -rf mongoose*