-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCompile
More file actions
37 lines (28 loc) · 853 Bytes
/
Compile
File metadata and controls
37 lines (28 loc) · 853 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
ASM_TARGET = asm
CPU_TARGET = cpu
DISASM_TARGET = disasm
CC = g++
CFLAGS = # -g -fsanitize=address
ROOT_DIR = ./
LIB_DIR = ./Libs/
SRC_DIR = ./Source/
APP_DIR = ./App/
ASM_SRC = $(SRC_DIR)asm.cpp \
$(LIB_DIR)Onegin/Source/functions.cpp
CPU_SRC = $(SRC_DIR)cpu.cpp \
$(LIB_DIR)Stack/Source/Stack.cpp \
$(LIB_DIR)Stack/Source/Log.cpp \
$(LIB_DIR)Stack/Source/HashCounters.cpp \
$(LIB_DIR)Onegin/Source/functions.cpp
DISASM_SRC = $(SRC_DIR)disasm.cpp
all: create_app_folder $(ASM_TARGET) $(CPU_TARGET) $(DISASM_TARGET)
create_app_folder :
mkdir ./App
$(ASM_TARGET) :
$(CC) $(CFLAGS) $(ASM_SRC) -o $(APP_DIR)$(ASM_TARGET)
$(DISASM_TARGET) :
$(CC) $(CFLAGS) $(DISASM_SRC) -o $(APP_DIR)$(DISASM_TARGET)
$(CPU_TARGET) :
$(CC) $(CFLAGS) $(CPU_SRC) -o $(APP_DIR)$(CPU_TARGET)
clean :
rm -R -f *.o $(APP_DIR)