Skip to content

Commit

Permalink
Import
Browse files Browse the repository at this point in the history
  • Loading branch information
cpq committed Feb 12, 2023
0 parents commit 4eccb4e
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: build
on: push
jobs:
linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: sudo apt-get install musl-tools
- run: make linux
- run: make windows
macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- run: make macos
21 changes: 21 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
CWD ?= $(realpath $(CURDIR))
VERSION ?= queue

all: linux macos windows

linux: mongoose
$(MAKE) -C mongoose/examples/http-server PROG=mongoose_$@ CC=musl-gcc CFLAGS_EXTRA="-static -s -Os"
mv mongoose/examples/http-server/mongoose_$@ .

windows: mongoose
$(MAKE) -C mongoose/examples/http-server PROG=mongoose.exe \
CC="docker run --platform linux/amd64 --rm -v $(CWD):$(CWD) -w $(CWD)/mongoose/examples/http-server mdashnet/vc22 wine64 cl" \
CFLAGS="/MD /nologo"
mv mongoose/examples/http-server/mongoose.exe .

macos: mongoose
$(MAKE) -C mongoose/examples/http-server PROG=mongoose_$@ mongoose_$@
mv mongoose/examples/http-server/mongoose_$@ .

mongoose:
git clone --depth 1 -b $(VERSION) https://github.com/cesanta/mongoose $@

0 comments on commit 4eccb4e

Please sign in to comment.