diff options
author | Jesse Barnes <jbarnes@virtuousgeek.org> | 2008-09-24 11:41:27 -0700 |
---|---|---|
committer | Patrick Tjin <pattjin@google.com> | 2014-07-21 20:22:38 -0700 |
commit | de0e4d223d083d695d62c4d057f40105a2889e76 (patch) | |
tree | 87869c1d34b59d016af573e3ab327d96fe9598fd | |
parent | 56ce5adc402b046a8531047f48d2aef778baebd1 (diff) | |
download | bootstub-de0e4d223d083d695d62c4d057f40105a2889e76.tar.gz |
Add CFLAGS to allow for cross compiling from x86_64
Could be smarter to avoid having to uncomment it, but works fine for me.
-rw-r--r-- | Makefile | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -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 |