aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
blob: f440556b9dee6fb1eee13a01daf681c8b0f8e84e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
BIN := build/tb_ml
SRC := source/tb_ml/tb_ml.c

CC ?= gcc
CFLAGS :=  -Wno-attributes \
          -fno-omit-frame-pointer -Wno-unused-variable \
          -Wno-unused-function -fno-asynchronous-unwind-tables \
          -ftime-report -O0 --std=c99 -g
LDFLAGS := -lm

.PHONY: all run clean help

all: clean $(BIN)

$(BIN): $(SRC)
	@mkdir -p $(dir $@)
	$(CC) $(CFLAGS) $< -o $@ $(LDFLAGS)

run: all
	./$(BIN)

clean:
	rm -rf build