Index: arch/mips/boot/Makefile
===================================================================
--- arch/mips/boot/Makefile	(revision 0970f437341b562c11ad934c2a9f026b55262587)
+++ arch/mips/boot/Makefile	(revision 50a4e256a630b27cffa30ab973ddb92de531f0fd)
@@ -10,14 +10,16 @@
 
 AS=$(MIPS_BINUTILS_DIR)/$(MIPS_TARGET)-as
+CC=$(MIPS_BINUTILS_DIR)/$(MIPS_TARGET)-gcc
 LD=$(MIPS_BINUTILS_DIR)/$(MIPS_TARGET)-ld
 
-ASFLAGS=-mips2
+ASFLAGS=-mips2 -I../../../include
 LFLAGS=--oformat=binary -mips2 -e start
 
+.S.o:
+	$(CC) $(ASFLAGS) -c -o $@ $<
+
 boot.bin: boot.o
-	$(LD) $(LFLAGS) boot.o -o $@
+	$(LD) $(LFLAGS) $< -o $@
 
-boot.o:
-	$(AS) boot.s -o $@
 
 clean:
