-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
29 lines (20 loc) · 755 Bytes
/
Makefile
File metadata and controls
29 lines (20 loc) · 755 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
TARGET = ./app
CFLAGS = -fsanitize=address -O3 -w
NO_OUT = >/dev/null
SOURCE = ./app.cpp ./Source/Translator.cpp ./Source/IR.cpp
filename = test
all: recompile_processor compile_app run_asm_compilation run_app
compile_app:
@g++ $(SOURCE) $(CFLAGS) -o $(TARGET) $(NO_OUT)
recompile_processor:
@make -f ./Processor/Compile ROOT_DIR=./Processor/ $(NO_OUT)
run_asm_compilation:
@make -f Run filename=$(filename) $(NO_OUT)
run_app:
@$(TARGET) ./$(filename).exe
BYTE_CHECK_DIR = ./Debug/ByteCheck
BYTE_CHECK_TARGET = $(BYTE_CHECK_DIR)/byte_check
check:
@nasm -f elf64 $(BYTE_CHECK_TARGET).s -l $(BYTE_CHECK_TARGET).lst -o $(BYTE_CHECK_TARGET).o
@g++ -no-pie -s -Wno-format $(BYTE_CHECK_TARGET).o -o $(BYTE_CHECK_TARGET)
@$(BYTE_CHECK_TARGET)