diff --git a/Makefile.compile b/Makefile.compile index fd3f706c..3d9d6067 100644 --- a/Makefile.compile +++ b/Makefile.compile @@ -5,6 +5,7 @@ AS = $(CROSS_COMPILE)gcc CC = $(CROSS_COMPILE)gcc CXX = $(CROSS_COMPILE)g++ LD = $(CROSS_COMPILE)ld +AR = $(CROSS_COMPILE)ar OBJDUMP = $(CROSS_COMPILE)objdump OBJCOPY = $(CROSS_COMPILE)objcopy READELF = $(CROSS_COMPILE)readelf diff --git a/Makefile.lib b/Makefile.lib index 0e57035a..bf5e8d70 100644 --- a/Makefile.lib +++ b/Makefile.lib @@ -15,10 +15,12 @@ CFLAGS += -fdata-sections -ffunction-sections -fno-builtin ## Paste in "Makefile.compile" here include $(AM_HOME)/Makefile.compile +AR = $(CROSS_COMPILE)ar + ## Compliation rule for objects -> .a (using ar) $(ARCHIVE): $(OBJS) @echo + AR "->" $(shell realpath $@ --relative-to .) - @ar rcs $(ARCHIVE) $(OBJS) + @$(AR) rcs $(ARCHIVE) $(OBJS) clean: rm -rf $(LIB_DIR)/build/