Makefile: fix ar in macOS
This commit is contained in:
parent
21bfbcb293
commit
6d79d0efb0
1 changed files with 2 additions and 1 deletions
3
Makefile
3
Makefile
|
@ -70,6 +70,7 @@ AS = $(CROSS_COMPILE)gcc
|
||||||
CC = $(CROSS_COMPILE)gcc
|
CC = $(CROSS_COMPILE)gcc
|
||||||
CXX = $(CROSS_COMPILE)g++
|
CXX = $(CROSS_COMPILE)g++
|
||||||
LD = $(CROSS_COMPILE)ld
|
LD = $(CROSS_COMPILE)ld
|
||||||
|
AR = $(CROSS_COMPILE)ar
|
||||||
OBJDUMP = $(CROSS_COMPILE)objdump
|
OBJDUMP = $(CROSS_COMPILE)objdump
|
||||||
OBJCOPY = $(CROSS_COMPILE)objcopy
|
OBJCOPY = $(CROSS_COMPILE)objcopy
|
||||||
READELF = $(CROSS_COMPILE)readelf
|
READELF = $(CROSS_COMPILE)readelf
|
||||||
|
@ -134,7 +135,7 @@ $(IMAGE).elf: $(OBJS) am $(LIBS)
|
||||||
### Rule (archive): objects (`*.o`) -> `ARCHIVE.a` (ar)
|
### Rule (archive): objects (`*.o`) -> `ARCHIVE.a` (ar)
|
||||||
$(ARCHIVE): $(OBJS)
|
$(ARCHIVE): $(OBJS)
|
||||||
@echo + AR "->" $(shell realpath $@ --relative-to .)
|
@echo + AR "->" $(shell realpath $@ --relative-to .)
|
||||||
@ar rcs $(ARCHIVE) $(OBJS)
|
@$(AR) rcs $(ARCHIVE) $(OBJS)
|
||||||
|
|
||||||
### Rule (`#include` dependencies): paste in `.d` files generated by gcc on `-MMD`
|
### Rule (`#include` dependencies): paste in `.d` files generated by gcc on `-MMD`
|
||||||
-include $(addprefix $(DST_DIR)/, $(addsuffix .d, $(basename $(SRCS))))
|
-include $(addprefix $(DST_DIR)/, $(addsuffix .d, $(basename $(SRCS))))
|
||||||
|
|
Loading…
Add table
Reference in a new issue