first commit

This commit is contained in:
2024-03-24 15:01:24 +01:00
commit 32eea495d8
2 changed files with 112 additions and 0 deletions

28
Makefile Normal file
View File

@ -0,0 +1,28 @@
.PHONY: all clean run
VERSION = 0.0.1
LIBS = sdl2
CMACRO = -DVERSION=\"$(VERSION)\"
CC = gcc
CFLAGS = -g -Wall -Wextra -pedantic $(shell pkg-config $(LIBS) --cflags) $(CMACRO)
LDFLAGS = $(shell pkg-config $(LIBS) --libs) -lm
all: pong
pong: pong.o
$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)
%.o: %.c
$(CC) $(CFLAGS) -c -o $@ $<
clean:
rm -f *.o
rm -f pong
bear: clean
bear -- make
run: pong
./$<