[in progress] a 2d storytelling-oriented game engine, built on allegro 5
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

29 lines
835 B

CFLAGS+=-Wall -O2 $(shell pkg-config --cflags allegro-5 allegro_image-5 allegro_font-5 allegro_ttf-5)
CFLAGSDEBUG=-Wall -ggdb3 -O0 -DDEBUG $(shell pkg-config --cflags allegro-5 allegro_image-5 allegro_font-5 allegro_ttf-5)
LDFLAGS+=-Wall -O2 $(shell pkg-config --libs allegro-5 allegro_image-5 allegro_font-5 allegro_ttf-5)
LDFLAGSDEBUG=-Wall -ggdb3 -O0 -DDEBUG $(shell pkg-config --libs allegro-5 allegro_image-5 allegro_font-5 allegro_ttf-5)
SRCDIR=./src
OBJDIR=./obj
SRC=$(wildcard $(SRCDIR)/*.c)
OBJ=$(patsubst $(SRCDIR)%.c,$(OBJDIR)%.o,$(SRC))
BIN=gafu
all: $(OBJ)
$(CC) $(LDFLAGS) -o $(BIN) $^
$(OBJ): | $(OBJDIR)
$(OBJDIR)/%.o: $(SRCDIR)/%.c
$(CC) $(CFLAGS) -c -o $@ $<
$(OBJDIR):
mkdir -p $(OBJDIR)
clean:
rm -rf $(OBJDIR) $(BIN)
debug: CFLAGS=$(CFLAGSDEBUG)
debug: LDFLAGS=$(LDFLAGSDEBUG)
debug: all
new: clean all