Source

Open PS2 Loader / loader / Makefile.alt

# Copyright 2009-2010, Ifcaro, jimmikaelkael & Polo
# Copyright 2006-2008 Polo
# Licenced under Academic Free License version 3.0
# Review OPNPS2LD README & LICENSE files for further details.
#
# Copyright 2001-2004, ps2dev - http://www.ps2dev.org
# Licenced under Academic Free License version 2.0
# Review ps2sdk README & LICENSE files for further details.
#
# Alternative Makefile
# Loader section begin at 0x00090000 instead of 0x000e8000
# g_buf is located at 0x01700000 instead of 0x00088000

EE_BIN = loader.elf
EE_OBJS = loader.o syshook.o iopmgr.o modmgr.o misc.o patches.o padhook.o crt0.o

EE_INCS := -I$(PS2SDK)/ee/include -I$(PS2SDK)/common/include -I.
EE_CFLAGS = -DLOAD_EECORE_DOWN -D_EE -O2 -G0 -Wall $(EE_INCS)

EE_LDFLAGS = -nostartfiles -Tlinkfile.alt -L$(PS2SDK)/ee/lib -L$(PS2SDK)/sbv/lib -s
EE_LIBS += -lpatches -lc -lkernel -lc

%.o : %.c
	$(EE_CC) $(EE_CFLAGS) $(EE_INCS) -c $< -o $@

%.o : %.s
	$(EE_AS) $(EE_ASFLAGS) $< -o $@

$(EE_BIN) : $(EE_OBJS)
	$(EE_CC) $(EE_CFLAGS) $(EE_LDFLAGS) -o $(EE_BIN) $(EE_OBJS) $(EE_LIBS) -Xlinker -Map -Xlinker loader_alt.map

	
all: $(EE_BIN)

clean:
	rm -f *.o *.a *.s *.map *.bak *.elf

clean_all:
	rm -f *.o *.a *.s *.map *.bak *.elf

include $(PS2SDK)/samples/Makefile.pref