-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
29 lines (19 loc) · 808 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
CC=gcc
PATH_INCLUDE=/opt/homebrew/include
PATH_LIB=/opt/homebrew/lib
HEADERS_PATH=./includes
IFLAGS=-I$(PATH_INCLUDE) -I$(HEADERS_PATH)
CFLAGS=-L$(PATH_LIB) -lSDL2
OUT_FILES = out/cpu.o out/rom.o out/memory.o out/interrupt.o
gemub: setup $(OUT_FILES)
$(CC) -g -fsanitize=address -o out/gemub src/main.c $(OUT_FILES) $(IFLAGS) $(CFLAGS)
out/cpu.o: ./includes/cpu.h ./src/cpu.c
$(CC) -g -fsanitize=address -c -o out/cpu.o src/cpu.c
out/rom.o: ./includes/rom.h ./src/rom.c
$(CC) -g -fsanitize=address -c -o out/rom.o src/rom.c
out/memory.o: ./includes/memory.h ./src/memory.c
$(CC) -g -fsanitize=address -c -o out/memory.o src/memory.c
out/interrupt.o: ./includes/interrupt.h ./src/interrupt.c
$(CC) -g -fsanitize=address -c -o out/interrupt.o src/interrupt.c
setup:
[ -d "./out" ] || mkdir out