multiple files

This commit is contained in:
Rakarake 2025-12-14 14:03:57 +01:00
parent 5943b483ce
commit 864df46d69
6 changed files with 324 additions and 296 deletions

View file

@ -2,8 +2,16 @@ LIBS=sdl3 opengl wayland-client
CFLAGS=-g -Wall -Wextra $(shell pkg-config --cflags $(LIBS))
LDFLAGS=$(shell pkg-config --libs $(LIBS))
all:
$(CC) $(CFLAGS) $(LDFLAGS) -o glonkers main.c
objects = renderer.o
run: all
glonkers: $(objects) glonkers.c
$(CC) $(CFLAGS) $(LDFLAGS) -o glonkers $^
$(objects): %.o: %.c
$(CC) $(CFLAGS) $(LDFLAGS) -c $^ -o $@
clean:
rm -f *.o glonkers
run: glonkers
SDL_VIDEODRIVER="wayland,x11" ./glonkers