Skip to content

Commit 4eccb4e

Browse files
committed
Import
0 parents  commit 4eccb4e

2 files changed

Lines changed: 36 additions & 0 deletions

File tree

.github/workflows/build.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: build
2+
on: push
3+
jobs:
4+
linux:
5+
runs-on: ubuntu-latest
6+
steps:
7+
- uses: actions/checkout@v3
8+
- run: sudo apt-get install musl-tools
9+
- run: make linux
10+
- run: make windows
11+
macos:
12+
runs-on: macos-latest
13+
steps:
14+
- uses: actions/checkout@v3
15+
- run: make macos

Makefile

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
CWD ?= $(realpath $(CURDIR))
2+
VERSION ?= queue
3+
4+
all: linux macos windows
5+
6+
linux: mongoose
7+
$(MAKE) -C mongoose/examples/http-server PROG=mongoose_$@ CC=musl-gcc CFLAGS_EXTRA="-static -s -Os"
8+
mv mongoose/examples/http-server/mongoose_$@ .
9+
10+
windows: mongoose
11+
$(MAKE) -C mongoose/examples/http-server PROG=mongoose.exe \
12+
CC="docker run --platform linux/amd64 --rm -v $(CWD):$(CWD) -w $(CWD)/mongoose/examples/http-server mdashnet/vc22 wine64 cl" \
13+
CFLAGS="/MD /nologo"
14+
mv mongoose/examples/http-server/mongoose.exe .
15+
16+
macos: mongoose
17+
$(MAKE) -C mongoose/examples/http-server PROG=mongoose_$@ mongoose_$@
18+
mv mongoose/examples/http-server/mongoose_$@ .
19+
20+
mongoose:
21+
git clone --depth 1 -b $(VERSION) https://github.com/cesanta/mongoose $@

0 commit comments

Comments
 (0)