summaryrefslogtreecommitdiff
path: root/Makefile
blob: 327ff6c48e9b47d1f52cbbf1e4c107ce9c9ffcd1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
CC = cc
LIBRARIES = -lreadline
SOURCES =
OUTPUT_DIR = bin
OUTPUT = -o $(OUTPUT_DIR)/PROG

rvsh: output_dir
	$(CC) -std=c11 -Ofast $(LIBRARIES) $(SOURCES) rvsh.c $(OUTPUT:PROG=rvsh)

debug: output_dir
	$(CC) -std=c11 -Wall -Wextra -Wpedantic -Werror -g3 -O0 $(LIBRARIES) $(SOURCES) rvsh.c $(OUTPUT:PROG=rvsh)

output_dir:
	mkdir -p $(OUTPUT_DIR)

clean:
	rm -rf $(OUTPUT_DIR) **.h.gch