summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--payloads/libpayload/sample/Makefile13
1 files changed, 6 insertions, 7 deletions
diff --git a/payloads/libpayload/sample/Makefile b/payloads/libpayload/sample/Makefile
index 497f051999..1a32f3b0fb 100644
--- a/payloads/libpayload/sample/Makefile
+++ b/payloads/libpayload/sample/Makefile
@@ -28,10 +28,9 @@
##
# Sample libpayload Makefile.
-
-LIBPAYLOAD_DIR := ..
-CC := $(LIBPAYLOAD_DIR)/bin/lpgcc
-AS := $(LIBPAYLOAD_DIR)/bin/lpas
+LIBPAYLOAD_DIR := ../install/libpayload
+XCC := CC=$(CC) $(LIBPAYLOAD_DIR)/bin/lpgcc
+XAS := AS=$(AS) $(LIBPAYLOAD_DIR)/bin/lpas
CFLAGS := -Wall -Werror -Os
TARGET := hello
OBJS := $(TARGET).o
@@ -39,13 +38,13 @@ OBJS := $(TARGET).o
all: $(TARGET).elf
$(TARGET).elf: $(OBJS)
- $(CC) -o $@ $(OBJS)
+ $(XCC) -o $@ $(OBJS)
%.o: %.c
- $(CC) $(CFLAGS) -c -o $@ $<
+ $(XCC) $(CFLAGS) -c -o $@ $<
%.S.o: %.S
- $(AS) --32 -o $@ $<
+ $(XAS) --32 -o $@ $<
clean:
rm -f $(TARGET).elf *.o