From de0e4d223d083d695d62c4d057f40105a2889e76 Mon Sep 17 00:00:00 2001 From: Jesse Barnes Date: Wed, 24 Sep 2008 11:41:27 -0700 Subject: Add CFLAGS to allow for cross compiling from x86_64 Could be smarter to avoid having to uncomment it, but works fine for me. --- Makefile | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 0c89f9c..8e1f045 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,7 @@ OBJ=bootstub.o spi-uart.o head.o +CFLAGS=-ffreestanding -Wall +#for cross compile +#CFLAGS=-m32 -ffreestanding -Wall all: bootstub @@ -12,13 +15,13 @@ bootstub.elf:bootstub.lds $(OBJ) ld -m elf_i386 -T bootstub.lds $(OBJ) -o $@ bootstub.o:bootstub.c bootstub.h - gcc -Wall -c bootstub.c + gcc $(CFLAGS) -c bootstub.c spi-uart.o:spi-uart.c spi-uart.h - gcc -Wall -c spi-uart.c + gcc $(CFLAGS) -c spi-uart.c head.o:head.S bootstub.h - gcc -Wall -c head.S + gcc $(CFLAGS) -c head.S clean: rm -rf *.o *.bin *.elf *.bz2 *.rpm -- cgit v1.2.3