commit 54e36aaa0c187e5d8a9513741733004af3f39d9f parent 0617f390aba323f058a118597dd3c3ac459d8578 Author: finwo <finwo@pm.me> Date: Tue, 24 Oct 2023 00:27:20 +0200 Have makefile support BIN Diffstat:
| M | .github/workflows/cc.yml | | | 10 | +++++----- |
| M | Makefile | | | 7 | ++++--- |
2 files changed, 9 insertions(+), 8 deletions(-)
diff --git a/.github/workflows/cc.yml b/.github/workflows/cc.yml @@ -16,7 +16,7 @@ jobs: include: - os: windows-latest cc: clang - bin: fnet_test.exe + bin: http-parser-test.exe steps: - uses: actions/checkout@v3 @@ -54,22 +54,22 @@ jobs: - distro: ubuntu_latest arch: aarch64 cc: gcc - bin: fnet_test-aarch64 + bin: http-parser-test-aarch64 - distro: ubuntu_latest arch: armv7 cc: gcc - bin: fnet_test-armv7 + bin: http-parser-test-armv7 - distro: ubuntu_latest arch: riscv64 cc: gcc - bin: fnet_test-riscv64 + bin: http-parser-test-riscv64 - distro: ubuntu_latest arch: none cc: gcc - bin: fnet_test-x86_64 + bin: http-parser-test-x86_64 steps: diff --git a/Makefile b/Makefile @@ -1,17 +1,18 @@ SRC=$(wildcard src/*.c) SRC+=test.c +BIN?=http-parser-test override CFLAGS?=-Wall -s -O2 include lib/.dep/config.mk -http-parser-test: $(SRC) src/http-parser-statusses.h src/http-parser.h +$(BIN): $(SRC) src/http-parser-statusses.h src/http-parser.h $(CC) -Isrc $(INCLUDES) $(CFLAGS) -o $@ $(SRC) .PHONY: check -check: http-parser-test +check: $(BIN) ./$< .PHONY: clean clean: - rm -f http-parser-test + rm -f $(BIN)