-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
43 lines (34 loc) · 971 Bytes
/
Makefile
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
CC = g++
INCLUDES = -Isrc/turing_machine -Isrc/utils
CFLAGS = -std=c++14
RM = rm -r
MKDIR = mkdir -p
VPATH = src/utils src/turing_machine
BUILDDIR = build/utils build/turing_machine
OBJS = build/main.o \
build/utils/string_utils.o \
build/turing_machine/turing_machine.o
all: directories bin/tm_sim samples
@echo Done
bin/tm_sim: $(OBJS)
@echo Building $@
@$(CC) $(CFLAGS) $(INCLUDES) $^ -o $@
build/main.o: src/main.cpp
@echo Building $@
@$(CC) $(CFLAGS) $(INCLUDES) -c $< -o $@
build/turing_machine/turing_machine.o: src/turing_machine/turing_machine.cpp
@echo Building $@
@$(CC) $(CFLAGS) $(INCLUDES) -c $< -o $@
build/utils/string_utils.o: src/utils/string_utils.cpp
@echo Building $@
@$(CC) $(CFLAGS) $(INCLUDES) -c $< -o $@
directories:
@echo Making build directories
@$(MKDIR) $(BUILDDIR)
samples:
@echo Copying sample files
@cp src/samples/ bin/ -r
clean:
@echo Cleaning up
@$(RM) build/*.o build/**/*.o
@$(RM) bin/* bin/**/*