24 lines
255 B
Makefile
24 lines
255 B
Makefile
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) $(CFLAGS)
|
|
|
|
dist:
|
|
mkdir -p dist
|
|
|
|
clean:
|
|
rm -rf dist
|