Skip to content

Commit 9afb3dd

Browse files
authored
Merge pull request #852 from sleeptightAnsiC/feat__sdl3_renderer_demo
Add sdl3_renderer demo V4
2 parents fcd64f8 + ec5e8d7 commit 9afb3dd

File tree

6 files changed

+1172
-0
lines changed

6 files changed

+1172
-0
lines changed

demo/sdl3_renderer/Makefile

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
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+

0 commit comments

Comments
 (0)