-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMakefile
More file actions
30 lines (23 loc) · 767 Bytes
/
Makefile
File metadata and controls
30 lines (23 loc) · 767 Bytes
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
30
CWD ?= $(realpath $(CURDIR))
PROJ = mongoose/tutorials/http/http-server
VERSION ?= 7.20
all: linux macos windows
linux: mongoose
$(MAKE) -C $(PROJ) example CC=musl-gcc CFLAGS_EXTRA="-static -s -Os"
mv $(PROJ)/example mongoose_$@
windows: mongoose
$(MAKE) -C $(PROJ) example \
CC="docker run --platform linux/amd64 --rm -v $(CWD):$(CWD) -w $(CWD)/$(PROJ) mdashnet/vc98 wine cl" \
CFLAGS="/MD /nologo /Os" \
CFLAGS_EXTRA="-UMG_ENABLE_IPV6" \
OUT=/Femongoose.exe
mv $(PROJ)/mongoose.exe .
macos: mongoose
$(MAKE) -C $(PROJ) example CFLAGS_EXTRA="-Os"
mv $(PROJ)/example mongoose_$@
version:
echo $(VERSION)
mongoose:
git clone --depth 1 -b $(VERSION) https://github.com/cesanta/mongoose $@
clean:
rm -rf mongoose*