upload of the files for pgb

This commit is contained in:
Patrick 2025-11-25 19:01:03 +01:00
commit 335839205a
10 changed files with 2905 additions and 0 deletions

31
Makefile Normal file
View file

@ -0,0 +1,31 @@
CC = cc
CFLAGS = -Wall -Wextra -Wpedantic -Werror -std=c99 -lX11
SRCDIR = src
OBJDIR = obj
SRC = $(wildcard $(SRCDIR)/*.c)
OBJ = $(SRC:$(SRCDIR)/%.c=$(OBJDIR)/%.o)
TARGET = pgb
debug: CFLAGS += -g3 -fsanitize=address
debug: all
release: CFLAGS += -O3 -s
release: all
all: $(OBJDIR) $(TARGET)
$(TARGET): $(OBJ)
$(CC) $(CFLAGS) -o $@ $^
$(OBJDIR):
mkdir -p $(OBJDIR)
$(OBJDIR)/%.o: $(SRCDIR)/%.c
$(CC) $(CFLAGS) -c $< -o $@
clean:
rm -rf $(OBJDIR) $(TARGET)
.PHONY: clean all debug release