46 lines
1.4 KiB
Text
46 lines
1.4 KiB
Text
TARGETS := libemu.a vgbc vgbc.test vgbc.inspect vgbc.gbdif vgbc.lcdtest
|
|
|
|
sfml_packages := sfml-graphics sfml-system
|
|
sfml_CXXFLAGS := $(shell pkg-config --cflags $(sfml_packages))
|
|
sfml_LDFLAGS := $(shell pkg-config --libs $(sfml_packages))
|
|
|
|
CXXFLAGS := -I $(CURDIR) $(sfml_CXXFLAGS)
|
|
|
|
cmd_libemu.a = ar -rc $@ $^
|
|
verb_libemu.a = pack
|
|
modules_libemu.a := memory/device.o \
|
|
memory/bus.o \
|
|
memory/ram.o \
|
|
memory/bootrom_overlay.o \
|
|
memory/register.o \
|
|
memory/bank.o \
|
|
cpu/cpu.o \
|
|
cpu/decoder.o \
|
|
cartridge/mbc/mbc1.o \
|
|
cartridge/cartridge.o \
|
|
lcd/lcd.o \
|
|
lcd/palette.o \
|
|
input/joypad.o \
|
|
timer/timer.o \
|
|
|
|
modules_vgbc := main.o libemu.a
|
|
verb_vgbc := link
|
|
LDFLAGS_vgbc := $(sfml_LDFLAGS)
|
|
|
|
sources_vgbc.test := $(shell find tests/ -name '*.cpp')
|
|
objects_vgbc.test := $(patsubst %.cpp,%.o,$(sources_vgbc.test))
|
|
modules_vgbc.test := $(objects_vgbc.test) libemu.a
|
|
verb_vgbc.test := link
|
|
|
|
$(objects_vgbc.test): CXXFLAGS+=-I $(CURDIR)/tests
|
|
|
|
modules_vgbc.inspect := cartridge/inspector.o libemu.a
|
|
verb_vgbc.inspect := link
|
|
|
|
# Game Boy Doctor Interface
|
|
modules_vgbc.gbdif := misc/gbdif.o libemu.a
|
|
verb_vgbc.gbdif := link
|
|
|
|
modules_vgbc.lcdtest := lcd/lcdtest.o libemu.a
|
|
verb_vgbc.lcdtest := link
|
|
LDFLAGS_vgbc.lcdtest := $(sfml_LDFLAGS)
|