Lines Matching +full:extra +full:- +full:user +full:- +full:files

2 # SPDX-License-Identifier: Apache-2.0
8 # By default all the build output is placed under the _build folder, but the user can override it
12 # See "Configurable/user overridible variables" below.
18 -include ${NSI_CONFIG_FILE}
22 # Configurable/user overridible variables:
35 NSI_ARCH?=-m32
37 NSI_COVERAGE?=--coverage
43 # Extra source files to be built in the runner context
45 # Extra include directories to be used while building in the runner context
47 # Extra libraries to be linked to the final executable
61 NSI_DEBUG?=-g
63 NSI_OPT?=-O0
65 NSI_WARNINGS?=-Wall -Wpedantic
67 NSI_CPPFLAGS?=-D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED
69 NO_PIE_CO:=-fno-pie -fno-pic
70 DEPENDFLAGS:=-MMD -MP
71 COMMON_BUILD_FLAGS:=-DNSI_RUNNER_BUILD ${NSI_DEBUG} ${NSI_WARNINGS} ${NSI_OPT} ${NO_PIE_CO} \
72 -DNSI_N_CPUS=${NSI_N_CPUS} -ffunction-sections -fdata-sections ${DEPENDFLAGS} ${NSI_BUILD_OPTIONS}
73 CFLAGS:=-std=c11 ${COMMON_BUILD_FLAGS} ${NSI_BUILD_C_OPTIONS}
75 FINALLINK_FLAGS:=${NO_PIE_CO} -no-pie ${NSI_WARNINGS} \
76 -Wl,--gc-sections -ldl -pthread \
77 ${NSI_LINK_OPTIONS} -lm
90 INCLUDES:=-I${NSI_PATH}common/src/include/ \
91 -I${NSI_PATH}common/src \
95 INCLUDES+=-I${NSI_PATH}native/src/include/
103 -include ${DEPENDFILES}
108 @if [ ! -d ${NSI_BUILD_PATH} ]; then mkdir -p ${NSI_BUILD_PATH}; fi
110 #Extra sources build:
112 @if [ ! -d $(dir $@) ]; then mkdir -p $(dir $@); fi
113 ${NSI_CC} ${NSI_CPPFLAGS} ${INCLUDES} ${CFLAGS} -c $< -o $@
115 #Extra C++ sources build:
117 @if [ ! -d $(dir $@) ]; then mkdir -p $(dir $@); fi
118 ${NSI_CXX} ${NSI_CPPFLAGS} ${INCLUDES} ${CXXFLAGS} -c $< -o $@
121 @if [ ! -d $(dir $@) ]; then mkdir -p $(dir $@); fi
122 ${NSI_CC} ${NSI_CPPFLAGS} ${INCLUDES} ${CFLAGS} -c $< -o $@
125 ${NSI_CC} -x c -E -P $< -o $@ ${DEPENDFLAGS}
128 if [ -f $@ ]; then rm $@ ; fi
129 ${NSI_AR} -cr $@ ${OBJS}
132 @if [ -z $< ] || [ ! -f $< ]; then \
137 @if [ ! -d $(dir $@) ]; then mkdir -p $(dir $@); fi
138 ${NSI_OBJCOPY} --localize-hidden $< $@ -w --localize-symbol=_* ${NSI_LOCALIZE_OPTIONS}
142 ${NSI_LINKER} -Wl,--whole-archive ${LOCALIZED_EMBSW} ${NSI_BUILD_PATH}/${RUNNER_LIB} \
143 ${NSI_EXTRA_LIBS} -Wl,--no-whole-archive \
144 -o $@ ${FINALLINK_FLAGS} -T ${NSI_BUILD_PATH}/linker_script.ld
156 find $(NSI_BUILD_PATH) -name "*.o" -or -name "*.exe" -or -name "*.a" -or -name "*.d" | xargs rm -f
159 find $(NSI_BUILD_PATH) -name "*.gcda" -or -name "*.gcno" | xargs rm -f ; true
175 @echo " clean_coverage : clean all coverage files"