zephyr/samples/static_lib/hello_world/Makefile
Sharron LIU c282811983 samples: static_lib: conditional assign BOARD (?=)
The sample app "static_lib" is very important to Zephyr user, which
demonstrate how to build and link a static lib.
ISSM team wanted to integrate this app in their IDE for quark platforms.
However they find the in "static_lib/hello_world/Makefile" BOARD is
hardcoded as qemu_x86.

This patch supports other BOARD passed from build command.
I have verified this app working fine @Arduino101.

Signed-off-by: Sharron LIU <sharron.liu@intel.com>
2017-06-08 07:55:25 -05:00

22 lines
451 B
Makefile

#
# Copyright (c) 2016 Intel Corporation
#
# SPDX-License-Identifier: Apache-2.0
#
BOARD ?= qemu_x86
CONF_FILE = prj.conf
export SOURCE_DIR = $(ZEPHYR_BASE)/samples/static_lib/hello_world
export LDFLAGS_zephyr += -L$(O)/mylib/lib
export ALL_LIBS += mylib
include ${ZEPHYR_BASE}/Makefile.inc
all qemu zephyr : all-mylib
clean pristine mrproper : clean-mylib
all-mylib: outputexports
all-mylib clean-mylib:
$(MAKE) -C ../mylib O=$(O) $(@:-mylib=)