Skip to content

Commit 58f26e9

Browse files
committed
add a normal Makefile
1 parent 1d58809 commit 58f26e9

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed

.gitignore

+4
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,7 @@
33

44
# Build output
55
build/
6+
heliage
7+
**/*.o
8+
9+
**/memory.log

Makefile

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
CXX = g++
2+
CXXFLAGS = -std=c++17 -Wall -Wextra
3+
LIBS = -lSDL2 -pthread
4+
OBJS = \
5+
src/bootrom.o \
6+
src/bus.o \
7+
src/cartridge.o \
8+
src/frontend/sdl.o \
9+
src/gb.o \
10+
src/joypad.o \
11+
src/main.o \
12+
src/ppu.o \
13+
src/sm83.o \
14+
src/timer.o
15+
16+
%.o: %.cpp
17+
$(CXX) -c -o $@ $< $(CXXFLAGS)
18+
19+
heliage: $(OBJS)
20+
$(CXX) -o $@ $^ $(LIBS)
21+
22+
clean:
23+
rm -r src/*.o heliage

0 commit comments

Comments
 (0)