2021-07-10 14:15:12 +02:00
|
|
|
# If you change this to exe, you'll have to rename the file ./thirdparty/nugget/ps-exe.ld too.
|
|
|
|
TYPE = ps-exe
|
|
|
|
|
2021-07-16 11:10:58 +02:00
|
|
|
THISDIR := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
|
|
|
|
|
|
|
|
SRCS += $(THISDIR)thirdparty/nugget/common/crt0/crt0.s
|
2021-11-28 19:59:05 +01:00
|
|
|
SRCS += $(THISDIR)thirdparty/nugget/common/syscalls/printf.s
|
|
|
|
|
|
|
|
CPPFLAGS += -I$(THISDIR)include
|
2021-07-16 11:10:58 +02:00
|
|
|
|
2021-08-02 14:03:41 +02:00
|
|
|
CPPFLAGS += -I$(THISDIR)thirdparty/nugget/psyq/include -I$(THISDIR)psyq-4_7-converted/include -I$(THISDIR)psyq-4.7-converted-full/include -I$(THISDIR)psyq/include -I$(THISDIR)../psyq/include
|
|
|
|
LDFLAGS += -L$(THISDIR)thirdparty/nugget/psyq/lib -L$(THISDIR)psyq-4_7-converted/lib -L$(THISDIR)psyq-4.7-converted-full/lib -L$(THISDIR)psyq/lib -L$(THISDIR)../psyq/lib
|
2021-07-16 11:37:03 +02:00
|
|
|
# add support for NDR008's VScode setup
|
|
|
|
CPPFLAGS += -I$(THISDIR)../third_party/psyq/include
|
|
|
|
LDFLAGS += -L$(THISDIR)../third_party/psyq/lib
|
2021-07-10 14:15:12 +02:00
|
|
|
LDFLAGS += -Wl,--start-group
|
|
|
|
LDFLAGS += -lapi
|
|
|
|
LDFLAGS += -lc
|
|
|
|
LDFLAGS += -lc2
|
|
|
|
LDFLAGS += -lcard
|
|
|
|
LDFLAGS += -lcomb
|
|
|
|
LDFLAGS += -lds
|
|
|
|
LDFLAGS += -letc
|
|
|
|
LDFLAGS += -lgpu
|
|
|
|
LDFLAGS += -lgs
|
|
|
|
LDFLAGS += -lgte
|
|
|
|
LDFLAGS += -lgun
|
|
|
|
LDFLAGS += -lhmd
|
|
|
|
LDFLAGS += -lmath
|
|
|
|
LDFLAGS += -lmcrd
|
|
|
|
LDFLAGS += -lmcx
|
|
|
|
LDFLAGS += -lpad
|
|
|
|
LDFLAGS += -lpress
|
|
|
|
LDFLAGS += -lsio
|
|
|
|
LDFLAGS += -lsnd
|
|
|
|
LDFLAGS += -lspu
|
|
|
|
LDFLAGS += -ltap
|
|
|
|
LDFLAGS += -lcd
|
|
|
|
LDFLAGS += -Wl,--end-group
|
|
|
|
|
2021-08-07 16:41:08 +02:00
|
|
|
include $(THISDIR)thirdparty/nugget/common.mk
|
2021-07-13 11:15:06 +02:00
|
|
|
|
2021-11-28 20:16:48 +01:00
|
|
|
define OBJCOPYME
|
|
|
|
$(PREFIX)-objcopy -I binary --set-section-alignment .data=4 --rename-section .data=.rodata,alloc,load,readonly,data,contents -O $(FORMAT) -B mips $< $@
|
|
|
|
endef
|
|
|
|
|
2021-07-10 14:15:12 +02:00
|
|
|
# convert TIM file to bin
|
|
|
|
%.o: %.tim
|
2021-11-28 20:16:48 +01:00
|
|
|
$(call OBJCOPYME)
|
2021-07-10 14:15:12 +02:00
|
|
|
|
|
|
|
# convert VAG files to bin
|
|
|
|
%.o: %.vag
|
2021-11-28 20:16:48 +01:00
|
|
|
$(call OBJCOPYME)
|
|
|
|
|
|
|
|
# convert HIT to bin
|
|
|
|
%.o: %.HIT
|
|
|
|
$(call OBJCOPYME)
|