diff options
| author | Nicholas Rodrigues Lordello <[email protected]> | 2026-09-12 21:32:08 +0200 |
|---|---|---|
| committer | Nicholas Rodrigues Lordello <[email protected]> | 2026-09-12 21:32:08 +0200 |
| commit | cfa3a680b679b3fbcd5967e0175207aef71f80c9 (patch) | |
| tree | 0e619d6c3119e4b74a895c415a87bb92e377dc6e /Makefile | |
| parent | b6aa39f80b399bae395a4e638d2e96b4931dce5a (diff) | |
Stricter Building
We build with C99 and enable more warnings. I want to refactor the
build system a bit, as it is not conventional at the moment, and
I think a top-level single Makefile will actually be nicer. I also
want to build intermediate `.a` archives for the `libs/` to clearly
seperate them as a "vendored dependency".
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -1,3 +1,7 @@ +CC = gcc +CFLAGS = -std=c99 -Wextra -O2 -Ilib/ $(shell pkg-config SDL3 --cflags) +LDFLAGS = $(shell pkg-config SDL3 --libs) + SRC = src/picow.c src/sysroot.c OBJ = $(patsubst %.c,%.o,$(SRC)) @@ -11,7 +15,7 @@ include makefiles/tools.mk include makefiles/wamr.mk picow: $(OBJ) $(STBI_OBJ) $(WAMR_OBJ) - $(CC) -o $@ $^ $$(pkg-config SDL3 --libs) + $(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS) .PHONY: lint lint: @@ -23,4 +27,4 @@ clean: clean-carts clean-stbi clean-system clean-tools clean-wamr rm -f picow $(OBJ) src/%.o: src/%.c - $(CC) -c -o $@ $< -Ilib/ $$(pkg-config SDL3 --cflags) + $(CC) $(CFLAGS) -c $< -o $@ |
