diff options
| author | kotorifan <kotorifan05@gmail.com> | 2026-01-23 15:15:48 +0100 |
|---|---|---|
| committer | kotorifan <kotorifan05@gmail.com> | 2026-02-04 09:02:16 +0100 |
| commit | 32837712fedf4557ff44df7d5b8ddbd40c5f7990 (patch) | |
| tree | 671d2b82f45d5e6de70ac5d15f59ea94b884d4b6 /Makefile | |
| download | gameboy-32837712fedf4557ff44df7d5b8ddbd40c5f7990.tar.gz | |
Stupid problems with the old git repo. New one, unfortunately.
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..8c78149 --- /dev/null +++ b/Makefile @@ -0,0 +1,31 @@ +NAME := gameboy +CXX := g++ +CXXFLAGS := -Wall -Wextra -pedantic -std=c++17 -O3 + +LDFLAGS := -lSDL2 -lSDL2_ttf + +DST_DIR := dst +SRC_DIR := src + +OBJS := $(DST_DIR)/Processor.cpp.o \ + $(DST_DIR)/SDL_stuff.cpp.o \ + $(DST_DIR)/Main.cpp.o \ + $(DST_DIR)/Memory.cpp.o \ + $(DST_DIR)/Debugger.cpp.o + +all: $(DST_DIR) $(NAME) + +$(DST_DIR): + mkdir -p $(DST_DIR) + +$(NAME): $(OBJS) + $(CXX) $(CXXFLAGS) -o $@ $^ $(LDFLAGS) + +$(DST_DIR)/%.cpp.o: $(SRC_DIR)/%.cpp + $(CXX) $(CXXFLAGS) -c -o $@ $< + +clean: + rm -rf $(DST_DIR) + rm -f $(NAME) + +.PHONY: clean all |
