diff options
author | katherine <ageha@airen-no-jikken.icu> | 2021-02-12 23:53:58 -0700 |
---|---|---|
committer | katherine <ageha@airen-no-jikken.icu> | 2021-02-12 23:53:58 -0700 |
commit | 7e9312ff453a7b079323bf1372f689eb67427338 (patch) | |
tree | dca68ab79777bf1da333b57d1124b09eb4993e10 /04-conway/Makefile | |
parent | 2355472a9ed997a6676c32f0342834c7c4aef6b2 (diff) | |
download | allegro-sketches-7e9312ff453a7b079323bf1372f689eb67427338.tar.gz |
conway
Diffstat (limited to '04-conway/Makefile')
-rw-r--r-- | 04-conway/Makefile | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/04-conway/Makefile b/04-conway/Makefile new file mode 100644 index 0000000..d892887 --- /dev/null +++ b/04-conway/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=conway + +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 |