40 lines
748 B
Makefile
40 lines
748 B
Makefile
NAME=ps2rom
|
|
TARGET=iop
|
|
KIND=bin
|
|
|
|
SELF=$(shell pwd)
|
|
INCS = -I$(TOP)/rom
|
|
|
|
CFLAGS = -ffreestanding -fno-stack-protector
|
|
CXXFLAGS = -fno-exceptions -fno-rtti
|
|
LDFLAGS = -nostartfiles -nodefaultlibs -Wl,-Map,$(BINDIR)/$(FINALNAME).map -T$(SELF)/link.ld -L$(BINDIR)
|
|
|
|
# Link to each portion of the ROM codebase. For now,
|
|
# this will only link to the EE ROM codebase.
|
|
LIBS=-lps2rom_ee_$(CONFIG)
|
|
|
|
# sources
|
|
SRCS = rom_start.s
|
|
|
|
include $(TOP)/build/core.mk
|
|
|
|
|
|
.PHONY: all clean clean-products
|
|
|
|
|
|
all: $(BINDIR)/$(FINALNAME).rom
|
|
|
|
$(BINDIR)/:
|
|
mkdir -p $@
|
|
|
|
$(OBJDIR)/:
|
|
mkdir -p $@
|
|
|
|
$(BINDIR)/$(FINALNAME).rom: $(BINDIR)/$(FINALNAME).elf
|
|
$(OBJCOPY) -O binary $< $@
|
|
|
|
clean: clean-products
|
|
-rm $(BINDIR)/$(FINALNAME).rom
|
|
|
|
include $(TOP)/build/products/$(KIND).mk
|