From c3e728fbdfa6a92a9b07e46d0ae0da7259e29d35 Mon Sep 17 00:00:00 2001 From: Jordan Crouse Date: Wed, 9 Apr 2008 23:05:59 +0000 Subject: libpayload: Implement gcc wrappers for libpayload libpayload uses a ton of flags and other scary gcc and ld options. These wrappers hide most of that from the user, so that using libpayload is as easy as lpgcc -o hello hello.c Signed-off-by: Jordan Crouse Acked-by: Uwe Hermann git-svn-id: svn://svn.coreboot.org/coreboot/trunk@3226 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1 --- payloads/libpayload/sample/Makefile | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'payloads/libpayload/sample/Makefile') diff --git a/payloads/libpayload/sample/Makefile b/payloads/libpayload/sample/Makefile index 1daea5f6ec..e01d4e85df 100644 --- a/payloads/libpayload/sample/Makefile +++ b/payloads/libpayload/sample/Makefile @@ -29,23 +29,17 @@ # Sample libpayload Makefile. -CC = gcc -CROSS_CFLAGS = -m32 +CC := ../bin/lpgcc -INCLUDES = -I../include -INCLUDES += -I$(shell $(CC) $(CROSS_CFLAGS) -print-search-dirs | head -n 1 | cut -d' ' -f2)include - -LIBPAYLOAD = ../libpayload.a -LIBGCC := $(shell $(CC) $(CROSS_CFLAGS) -print-libgcc-file-name) -CFLAGS := -Wall -Werror -Os -fno-stack-protector -nostdinc $(INCLUDES) +CFLAGS := -Wall -Werror -Os all: hello.elf hello.elf: hello.o - ld -T ../libpayload.ldscript -o $@ hello.o ../i386/head.o $(LIBPAYLOAD) $(LIBGCC) + $(CC) -o $@ hello.o hello.o: hello.c - $(CC) $(CROSS_CFLAGS) $(CFLAGS) -c -o $@ $< + $(CC) $(CFLAGS) -c -o $@ $< clean: rm -f hello.elf hello.o -- cgit v1.2.3