Clean up makefile
This commit is contained in:
8
Makefile
8
Makefile
@@ -1,14 +1,20 @@
|
|||||||
CC ?= gcc
|
CC ?= gcc
|
||||||
|
|
||||||
SOURCES := $(wildcard src/*.c)
|
SOURCES := $(wildcard src/*.c)
|
||||||
|
RELEASE ?= false
|
||||||
|
|
||||||
|
CFLAGS ?= -Wall
|
||||||
|
|
||||||
|
ifeq ($(RELEASE),true)
|
||||||
|
CFLAGS += -O3
|
||||||
|
endif
|
||||||
|
|
||||||
.PHONY: clean
|
.PHONY: clean
|
||||||
|
|
||||||
all: dist/msh
|
all: dist/msh
|
||||||
|
|
||||||
dist/msh: $(SOURCES) dist
|
dist/msh: $(SOURCES) dist
|
||||||
$(CC) -o $@ $(SOURCES)
|
$(CC) -o $@ $(SOURCES) $(CFLAGS)
|
||||||
|
|
||||||
dist:
|
dist:
|
||||||
mkdir -p dist
|
mkdir -p dist
|
||||||
|
|||||||
Reference in New Issue
Block a user