-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
23 lines (19 loc) · 803 Bytes
/
Copy pathMakefile
File metadata and controls
23 lines (19 loc) · 803 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
CXX = g++ -std=c++20
EXEC = run
CXXFLAGS = -Wall -g -O -MMD -IC:/Users/ioan1/SDL2-2.30.10/x86_64-w64-mingw32/include
LDFLAGS = -lgdiplus -lopengl32 -ldwmapi -lshlwapi -lgdi32 -LC:/Users/ioan1/SDL2-2.30.10/x86_64-w64-mingw32/lib -lmingw32 -lSDL2
SOURCES = olcNes.cc cpu.cc bus.cc disassembler.cc ppu.cc cartridge.cc mapper.cc mapper_000.cc mapper_001.cc dma.cc controller.cc logging.cc
OBJECTS = $(SOURCES:.cc=.o)
DEPENDS = $(SOURCES:.cc=.d)
# Target to build the executable
$(EXEC): $(OBJECTS)
$(CXX) $(OBJECTS) -o $(EXEC) $(CXXFLAGS) $(LDFLAGS)
# Compile each .cc file into a .o file
%.o: %.cc
$(CXX) -c $< -o $@ $(CXXFLAGS)
# Include the dependency files for make to track header dependencies
-include $(DEPENDS)
# Clean up build files
.PHONY: clean
clean:
rm -f $(OBJECTS) $(DEPENDS) $(EXEC)