upload of the files for pgb
This commit is contained in:
commit
335839205a
10 changed files with 2905 additions and 0 deletions
31
Makefile
Normal file
31
Makefile
Normal 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue