CFLAGS = -Os -g -Wall -std=c99 -msoft-float -mno-string \
-mno-multiple -mno-vsx -mno-altivec -mlittle-endian \
-fno-stack-protector -mstrict-align -ffreestanding \
+ -fno-delete-null-pointer-checks \
-fdata-sections -ffunction-sections -I../include \
-I $(LIBGRAMINC) \
-DLONG_TIMER_MULT=$(LONG_TIMER_MULT) \
-DBOOT_INIT_BASE=$(BOOT_INIT_BASE) \
-DSHORT_TIMER_MULT=$(SHORT_TIMER_MULT)
ASFLAGS = $(CFLAGS)
-LDFLAGS = -T powerpc.lds
+LDFLAGS = -static -nostdlib -T powerpc.lds
all: coldboot.hex coldboot.S
LD = $(CROSS_COMPILE)ld
OBJCOPY = $(CROSS_COMPILE)objcopy
-CFLAGS = -Os -g -Wall -std=c99 -msoft-float -mno-string -mno-multiple -mno-vsx -mno-altivec -mlittle-endian -fno-stack-protector -mstrict-align -ffreestanding -fdata-sections -ffunction-sections -I../include
+CFLAGS = -Os -g -Wall -std=c99 -mabi=elfv2 -msoft-float -mno-string -mno-multiple -mno-vsx -mno-altivec -mlittle-endian -fno-stack-protector -mstrict-align -ffreestanding -fdata-sections -ffunction-sections -I../include
ASFLAGS = $(CFLAGS)
LDFLAGS = -T powerpc.lds