diff options
author | Nicolas Boichat <drinkcat@chromium.org> | 2019-02-20 12:54:11 +0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2019-03-10 08:21:32 -0700 |
commit | 6674b24ac5a1a4fe05fe5b4d2c74e9981b4304b0 (patch) | |
tree | a751d9d075c3052eb910ea3aaf97c949532bf66a | |
parent | cec7957e56226c09a676b9d5373625715031b034 (diff) | |
download | chrome-ec-factory-atlas-11907.11.B.tar.gz |
Makefiles.rules: Add rule to create static libraries (.a)factory-atlas-11907.11.B
This will be useful for some targets (which will still need to fixup
the dependencies themselves).
BRANCH=none
BUG=b:124804731
TEST=With follow-up TEST CLs, libprivate.a can be created
Change-Id: I5a1f4726794b308824275530b08f327e679eb904
Signed-off-by: Nicolas Boichat <drinkcat@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1475108
-rw-r--r-- | Makefile.rules | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Makefile.rules b/Makefile.rules index c82e5de2d8..207b7900fc 100644 --- a/Makefile.rules +++ b/Makefile.rules @@ -91,6 +91,7 @@ cmd_c_to_host = $(HOSTCC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -MMD -MF $@.d -o $@ \ $(sort $(foreach c,$($(*F)-objs),util/$(c:%.o=%.c)) $(wildcard $*.c)) cmd_cxx_to_host = $(HOSTCXX) -std=c++0x $(COMMON_WARN) $(HOST_CXXFLAGS)\ -I ./$($(notdir $@)_ROOT) -o $@ $(filter %.cc,$^) $($(notdir $@)_LIBS) +cmd_o_to_a = $(AR) rcs $@ $^ cmd_host_test = $(MAKE) --no-print-directory BOARD=host PROJECT=$* \ V=$(V) out=build/host/$* TEST_BUILD=y EMU_BUILD=y CROSS_COMPILE= \ $(TEST_FLAG) build/host/$*/$*.exe @@ -492,6 +493,11 @@ $(out)/RO/%.o:%.S $(out)/RW/%.o:%.S $(call quiet,c_to_o,AS ) +# Default rules for archives, dependencies need to be fixes in build.mk +$(out)/RO/%.a: + $(call quiet,o_to_a,AR ) +$(out)/RW/%.a: + $(call quiet,o_to_a,AR ) # Conditionally force the rebuilding of ec_version.h only if it would be # changed. |