[coreboot] r3227 - trunk/payloads/libpayload/sample
svn at coreboot.org
svn at coreboot.org
Thu Apr 10 01:48:51 CEST 2008
Author: uwe
Date: 2008-04-10 01:48:48 +0200 (Thu, 10 Apr 2008)
New Revision: 3227
Modified:
trunk/payloads/libpayload/sample/Makefile
Log:
Make the sample Makefile a bit more generic, so it can be adapted more
easily for other payloads. Also, add a 'distclean' target (trivial).
Signed-off-by: Uwe Hermann <uwe at hermann-uwe.de>
Acked-by: Uwe Hermann <uwe at hermann-uwe.de>
Modified: trunk/payloads/libpayload/sample/Makefile
===================================================================
--- trunk/payloads/libpayload/sample/Makefile 2008-04-09 23:05:59 UTC (rev 3226)
+++ trunk/payloads/libpayload/sample/Makefile 2008-04-09 23:48:48 UTC (rev 3227)
@@ -29,17 +29,26 @@
# Sample libpayload Makefile.
-CC := ../bin/lpgcc
-
+LIBPAYLOAD_DIR := ..
+CC := $(LIBPAYLOAD_DIR)/bin/lpgcc
+AS := $(LIBPAYLOAD_DIR)/bin/lpas
CFLAGS := -Wall -Werror -Os
+TARGET := hello
+OBJS := $(TARGET).o
-all: hello.elf
+all: $(TARGET).elf
-hello.elf: hello.o
- $(CC) -o $@ hello.o
+$(TARGET).elf: $(OBJS)
+ $(CC) -o $@ $(OBJS)
-hello.o: hello.c
+%.o: %.c
$(CC) $(CFLAGS) -c -o $@ $<
+%.S.o: %.S
+ $(AS) --32 -o $@ $<
+
clean:
- rm -f hello.elf hello.o
+ rm -f $(TARGET).elf *.o
+
+distclean: clean
+
More information about the coreboot
mailing list