diff --git a/Makefile b/Makefile index e5ccacc..17a0f76 100644 --- a/Makefile +++ b/Makefile @@ -1,14 +1,20 @@ CC ?= gcc SOURCES := $(wildcard src/*.c) +RELEASE ?= false +CFLAGS ?= -Wall + +ifeq ($(RELEASE),true) + CFLAGS += -O3 +endif .PHONY: clean all: dist/msh dist/msh: $(SOURCES) dist - $(CC) -o $@ $(SOURCES) + $(CC) -o $@ $(SOURCES) $(CFLAGS) dist: mkdir -p dist