mirror of
https://github.com/The-OpenROAD-Project/abc.git
synced 2026-03-12 11:26:17 +08:00
Allow changing the ar binary.
This is useful for cross-compilation, when build `ar` cannot handle the target object files. The invocation of `ranlib` is replaced with `ar s`, which is equivalent and simplifies the build system a bit.
This commit is contained in:
5
Makefile
5
Makefile
@@ -1,6 +1,7 @@
|
||||
|
||||
CC := gcc
|
||||
CXX := g++
|
||||
AR := ar
|
||||
LD := $(CXX)
|
||||
|
||||
MSG_PREFIX ?=
|
||||
@@ -8,6 +9,7 @@ ABCSRC = .
|
||||
|
||||
$(info $(MSG_PREFIX)Using CC=$(CC))
|
||||
$(info $(MSG_PREFIX)Using CXX=$(CXX))
|
||||
$(info $(MSG_PREFIX)Using AR=$(AR))
|
||||
$(info $(MSG_PREFIX)Using LD=$(LD))
|
||||
|
||||
PROG := abc
|
||||
@@ -215,8 +217,7 @@ $(PROG): $(OBJ)
|
||||
|
||||
lib$(PROG).a: $(LIBOBJ)
|
||||
@echo "$(MSG_PREFIX)\`\` Linking:" $(notdir $@)
|
||||
$(VERBOSE)ar rv $@ $?
|
||||
$(VERBOSE)ranlib $@
|
||||
$(VERBOSE)$(AR) rsv $@ $?
|
||||
|
||||
lib$(PROG).so: $(LIBOBJ)
|
||||
@echo "$(MSG_PREFIX)\`\` Linking:" $(notdir $@)
|
||||
|
||||
Reference in New Issue
Block a user