File tree Expand file tree Collapse file tree 5 files changed +1114
-0
lines changed Expand file tree Collapse file tree 5 files changed +1114
-0
lines changed Original file line number Diff line number Diff line change 1+ # this Makefile is specific to GNU Make and GCC'compatible compilers
2+
3+ PKG_CONFIG ?= $(shell command -v pkg-config)
4+ ifeq (,$(PKG_CONFIG ) )
5+ $(error missing pkg-config utility!)
6+ endif
7+
8+ PKG_SDL3 ?= sdl3
9+ ifeq (,$(shell $(PKG_CONFIG ) --path $(PKG_SDL3 ) ) )
10+ $(error $(PKG_CONFIG ) could not find : $(PKG_SDL3 ) )
11+ endif
12+
13+ OS ?= $(shell uname -s)
14+ BINEXT-Windows_NT = .exe
15+ BINEXT ?= $(BINEXIT-$(OS ) )
16+
17+ TEMPDIR ?= ./bin
18+ BIN ?= $(TEMPDIR ) /demo$(BINEXT )
19+
20+ CFLAGS += -std=c89 -Wall -Wextra -Wpedantic
21+ CFLAGS += -O2
22+ # CFLAGS += -O0 -g
23+ # CFLAGS += -fsanitize=address
24+ # CFLAGS += -fsanitize=undefined
25+ CFLAGS += $(shell $(PKG_CONFIG ) $(PKG_SDL3 ) --cflags)
26+
27+ LIBS += -lm
28+ LIBS += $(shell $(PKG_CONFIG ) $(PKG_SDL3 ) --libs)
29+
30+ DEP ?= $(BIN ) .d
31+
32+ SRC = main.c
33+
34+ $(BIN ) :
35+ mkdir -p $(dir $@ )
36+ $(CC ) $(SRC ) -o $@ -MD -MF $(DEP ) $(CFLAGS ) $(LIBS )
37+
38+ $(BIN ) : $(SRC ) ./Makefile ./nuklear_sdl3_renderer.h ./../../nuklear.h
39+
40+ -include $(DEP )
41+
You can’t perform that action at this time.
0 commit comments