2014-01-06 19:31:13 +00:00
|
|
|
CXX = g++
|
2016-02-29 02:30:47 +00:00
|
|
|
RM = rm
|
|
|
|
CP = cp
|
|
|
|
|
|
|
|
MACHINE = $(shell $(CXX) -dumpmachine)
|
|
|
|
ifneq (,$(findstring i686,$(MACHINE)))
|
2017-06-12 20:13:54 +00:00
|
|
|
$(error 32 bit build no longer supported)
|
2016-02-29 02:30:47 +00:00
|
|
|
else ifneq (,$(findstring x86_64,$(MACHINE)))
|
|
|
|
ARCH = 64
|
|
|
|
else
|
|
|
|
$(error Unknown arch)
|
|
|
|
endif
|
|
|
|
|
|
|
|
CXXFLAGS_32 = -march=pentium4 -mtune=core2
|
|
|
|
CXXFLAGS_64 =
|
2024-03-22 15:31:22 +00:00
|
|
|
CXXFLAGS = -Wall -I../core/source/quickerNES/core/ -I../core/extern -O3 -Wfatal-errors -Werror -fomit-frame-pointer -flto -D_QUICKERNES_DETECT_JOYPAD_READS -D_QUICKERNES_ENABLE_TRACEBACK_SUPPORT $(CXXFLAGS_$(ARCH))
|
|
|
|
|
2016-02-15 23:22:16 +00:00
|
|
|
# TODO: include these as options in the Makefile
|
|
|
|
# -fprofile-generate
|
|
|
|
# -fprofile-use
|
2024-03-22 15:31:22 +00:00
|
|
|
TARGET = libquicknes.so
|
2016-02-29 02:30:47 +00:00
|
|
|
LDFLAGS_32 = -static -static-libgcc -static-libstdc++
|
|
|
|
LDFLAGS_64 =
|
|
|
|
LDFLAGS = -shared $(LDFLAGS_$(ARCH)) $(CXXFLAGS)
|
|
|
|
|
2021-07-17 22:09:22 +00:00
|
|
|
DEST_64 = ../../Assets/dll
|
|
|
|
DESTCOPY_64 = ../../output/dll
|
2014-01-06 19:31:13 +00:00
|
|
|
|
|
|
|
SRCS = \
|
2024-03-22 15:31:22 +00:00
|
|
|
../core/source/quickerNES/core/apu/vrc7/emu2413_state.cpp \
|
|
|
|
../core/source/quickerNES/core/apu/vrc7/emu2413.cpp \
|
|
|
|
../core/source/quickerNES/core/apu/vrc7/apu_vrc7.cpp \
|
|
|
|
../core/source/quickerNES/core/apu/fme7/apu_fme7.cpp \
|
|
|
|
../core/source/quickerNES/core/apu/namco/apu_namco.cpp \
|
|
|
|
../core/source/quickerNES/core/apu/effectsBuffer.cpp \
|
|
|
|
../core/source/quickerNES/core/apu/blipBuffer.cpp \
|
|
|
|
../core/source/quickerNES/core/apu/NESEffectsBuffer.cpp \
|
|
|
|
../core/source/quickerNES/core/apu/vrc6/apu_vrc6.cpp \
|
|
|
|
../core/source/quickerNES/core/apu/oscs.cpp \
|
|
|
|
../core/source/quickerNES/core/apu/apu.cpp \
|
|
|
|
../core/source/quickerNES/core/apu/buffer.cpp \
|
|
|
|
../core/source/quickerNES/core/apu/multiBuffer.cpp \
|
|
|
|
../core/source/quickerNES/core/emu.cpp \
|
|
|
|
../core/source/quickerNES/core/mappers/mapper.cpp \
|
|
|
|
../core/source/quickerNES/core/cpu.cpp \
|
|
|
|
../core/source/quickerNES/core/ppu/ppu.cpp \
|
|
|
|
../core/source/quickerNES/core/ppu/ppuRendering.cpp \
|
|
|
|
../core/source/quickerNES/core/ppu/ppuImpl.cpp \
|
|
|
|
../bizinterface.cpp
|
2014-01-06 19:31:13 +00:00
|
|
|
|
|
|
|
OBJS = $(SRCS:.cpp=.o)
|
|
|
|
|
|
|
|
all: $(TARGET)
|
|
|
|
|
|
|
|
%.o: %.cpp
|
|
|
|
$(CXX) -c -o $@ $< $(CXXFLAGS)
|
|
|
|
|
|
|
|
$(TARGET) : $(OBJS)
|
|
|
|
$(CXX) -o $@ $(LDFLAGS) $(OBJS)
|
|
|
|
|
|
|
|
clean:
|
2024-03-22 15:31:22 +00:00
|
|
|
$(RM) -f $(OBJS)
|
|
|
|
$(RM) -f $(TARGET)
|
2014-01-06 19:31:13 +00:00
|
|
|
|
|
|
|
install:
|
2016-02-29 02:30:47 +00:00
|
|
|
$(CP) $(TARGET) $(DEST_$(ARCH))
|
2021-07-17 22:09:22 +00:00
|
|
|
ifneq ("$(wildcard $(DESTCOPY_$(ARCH)))", "")
|
|
|
|
$(CP) $(TARGET) $(DESTCOPY_$(ARCH))
|
|
|
|
endif
|