diff options
| author | raven <citrons@mondecitronne.com> | 2026-04-08 22:51:39 -0500 |
|---|---|---|
| committer | raven <citrons@mondecitronne.com> | 2026-04-08 22:51:39 -0500 |
| commit | 18a86e1038b20cb6f8922beead08dcc24ba2a4d3 (patch) | |
| tree | 85cb74210d67d42763a4709d18af93aa60a8f400 /Makefile | |
| parent | 4a3429a96b5b5ea7468540349aeb4535d5738053 (diff) | |
rewrite and port to SDL3
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 34 |
1 files changed, 19 insertions, 15 deletions
@@ -1,22 +1,26 @@ -SDL_HEADERS=/usr/include/SDL2 +name=core -#CFLAGS=-g -Wall -fsanitize=undefined -fsanitize=address -I$(SDL_HEADERS) -CFLAGS=-g -Wall -I$(SDL_HEADERS) -#LFLAGS=-lSDL2 -fsanitize=undefined -fsanitize=address -LFLAGS=-lSDL2 -lm +CFLAGS= -g \ + $(shell pkg-config --cflags sdl3) \ + $(pkg-config --cflags sdl3-ttf) -core: core.o procfs.o memview.o - $(CC) -o $@ $^ $(LFLAGS) +LDFLAGS= \ + $(shell pkg-config --libs sdl3) \ + $(shell pkg-config --libs sdl3-ttf) -core.c: procfs.h memview.h -memview.c: procfs.h memview.h -procfs.c: procfs.h +srcs=$(shell find src -name '*.c') +objs=$(srcs:%.c=build/%.o) +deps=$(objs:.o=.d) -evilize: evilize.o +./build/$(name): $(objs) + $(CC) $(objs) -o $@ $(LDFLAGS) -.SUFFIXES: .c .o -.c.o: - $(CC) $(CFLAGS) -c -o $@ $< +./build/%.o: %.c + mkdir -p $(dir $@) + $(CC) $(CFLAGS) -MMD -MP -c $< -o $@ +.PHONY: clean clean: - rm -f *.o core + rm -rf build + +-include $(deps) |
