CC=gcc RELEASE=0 GFLAGS=-Wall -Wextra -Wswitch-enum -std=c11 DFLAGS=-fsanitize=address -fsanitize=undefined -ggdb RFLAGS=-O3 ifeq ($(RELEASE), 0) CFLAGS=$(GFLAGS) $(DFLAGS) else CFLAGS=$(GFLAGS) $(RFLAGS) endif DIST=build OUT=avm.out all: $(DIST)/$(OUT) $(DIST)/$(OUT): main.c | $(DIST) $(CC) $(CFLAGS) $^ -o $@ .PHONY: run run: $(DIST)/$(OUT) ./$^ $(DIST): mkdir $(DIST)