-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
41 lines (29 loc) · 824 Bytes
/
Copy pathMakefile
File metadata and controls
41 lines (29 loc) · 824 Bytes
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
CC = g++
CCFLAGS = -Wall -Wextra -std=c++17 -O3
LIBS =
PATH_SRC = ./src
PATH_INC = ./include
PATH_BIN = ./bin
PATH_TEST = ./main
.PHONY: all
all:
mkdir -p $(PATH_BIN)
@echo
@echo "*** Compiling object files ***"
@echo "***"
make $(OBJS)
make $(PATH_BIN)/befunge93.exe
@echo "***"
.PHONY: clean
clean:
@echo
@echo "*** Purging binaries ***"
@echo "***"
rm -rvf $(PATH_BIN)
@echo "***"
INTERPRETER_DEP = $(addprefix $(PATH_INC)/, interpreter.hpp opcodes.hpp) $(PATH_SRC)/interpreter.cpp
$(PATH_BIN)/interpreter.o: $(INTERPRETER_DEP)
$(CC) -I $(PATH_INC) $(DEFINED) $(CCFLAGS) $(PATH_SRC)/interpreter.cpp -c -o $(PATH_BIN)/interpreter.o
OBJS = $(addprefix $(PATH_BIN)/, interpreter.o)
$(PATH_BIN)/%.exe: $(PATH_TEST)/%.cpp $(OBJS)
$(CC) -I $(PATH_INC) $(DEFINED) $(CCFLAGS) $< $(OBJS) $(LIBS) -o $@