diff options
author | katherine <ageha@airen-no-jikken.icu> | 2021-02-10 16:57:35 -0700 |
---|---|---|
committer | katherine <ageha@airen-no-jikken.icu> | 2021-02-10 16:57:35 -0700 |
commit | c0bebcff77eacd58903e487533c510df1916b5e7 (patch) | |
tree | 3c3ba2c97ec309f3a1133de449f664010de46b0f /wolfautomata/Makefile | |
parent | 671c03f32e6a7928a14cb6e4c62101b0cf405bcb (diff) | |
download | allegro-sketches-c0bebcff77eacd58903e487533c510df1916b5e7.tar.gz |
wolfautomata
Diffstat (limited to 'wolfautomata/Makefile')
-rw-r--r-- | wolfautomata/Makefile | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/wolfautomata/Makefile b/wolfautomata/Makefile new file mode 100644 index 0000000..71038df --- /dev/null +++ b/wolfautomata/Makefile @@ -0,0 +1,29 @@ +CFLAGS+=-Wall -O2 $(shell pkg-config --cflags allegro-5 allegro_primitives-5 libsodium) +CFLAGSDEBUG=-Wall -ggdb3 -O0 -DDEBUG $(shell pkg-config --cflags allegro-5 allegro_primitives-5) +LDFLAGS+=-Wall -O2 $(shell pkg-config --libs allegro-5 allegro_primitives-5 libsodium) +LDFLAGSDEBUG=-Wall -ggdb3 -O0 -DDEBUG $(shell pkg-config --libs allegro-5 allegro_primitives-5) +SRCDIR=./src +OBJDIR=./build +SRC=$(wildcard $(SRCDIR)/*.c) +OBJ=$(patsubst $(SRCDIR)%.c,$(OBJDIR)%.o,$(SRC)) +BIN=wolfautomata + +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 |