-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
40 lines (33 loc) · 1.66 KB
/
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
30
31
32
33
34
35
36
37
38
39
40
all: smsPlus64.z64
@echo "Builded $(if $(RELEASE),release,debug)"
.PHONY: all
BUILD_DIR = build
include $(N64_INST)/include/n64.mk
ifeq ($(RELEASE),1)
N64_CFLAGS += -DNDEBUG
N64_CXXFLAGS += -DNDEBUG
endif
# Adjust for warnings, mostly generated by the emulator code
#N64_CFLAGS := $(shell echo $(N64_CFLAGS) | sed 's/-O2/-O3/' | sed 's/-Werror//g' | sed 's/-Wall//g' | sed 's/-Wno-error=[^ ]*//g')
#N64_CXXFLAGS := $(shell echo $(N64_CXXFLAGS) | sed 's/-O2/-O3/' | sed 's/-Werror//g' | sed 's/-Wall//g' | sed 's/-Wno-error=[^ ]*//g')
N64_CFLAGS := $(shell echo $(N64_CFLAGS) | sed 's/-Werror//g' | sed 's/-Wall//g' | sed 's/-Wno-error=[^ ]*//g')
N64_CXXFLAGS := $(shell echo $(N64_CXXFLAGS) | sed 's/-Werror//g' | sed 's/-Wall//g' | sed 's/-Wno-error=[^ ]*//g')
# add current folder and infones subfolder to include path
INCDIR = -I. -Ismsplus -Iassets
# add INCDIR to CFLAGS
CFLAGS += $(INCDIR) -DUSEMENU # -DLSB_FIRST=0
# add INCDIR to CXXFLAGS
CXXFLAGS += $(INCDIR) -DUSEMENU #-DLSB_FIRST=0
SUBDIRS = $(SOURCE_DIR) $(SOURCE_DIR)/smsplus $(SOURCE_DIR)/assets
vpath %.cpp $(SUBDIRS)
vpath %.c $(SUBDIRS)
#
OBJS = $(BUILD_DIR)/smsPlus64.o $(BUILD_DIR)/libdragonsprite.o $(BUILD_DIR)/loadrom.o $(BUILD_DIR)/render.o $(BUILD_DIR)/sms.o $(BUILD_DIR)/builtinrom.o $(BUILD_DIR)/sn76496.o $(BUILD_DIR)/system.o $(BUILD_DIR)/vdp.o $(BUILD_DIR)/z80.o $(BUILD_DIR)/menu.o $(BUILD_DIR)/RomLister.o $(BUILD_DIR)/FrensHelpers.o
smsPlus64.z64: N64_ROM_TITLE = "SMSPlus emulator"
smsPlus64.z64: $(BUILD_DIR)/smsPlus64.dfs
$(BUILD_DIR)/smsPlus64.dfs: $(wildcard filesystem/*)
$(BUILD_DIR)/smsPlus64.elf: $(OBJS)
clean:
rm -rf $(BUILD_DIR) *.z64
.PHONY: clean
-include $(wildcard $(BUILD_DIR)/*.d)