Commit 6c8e302a authored by mz-fuzzy's avatar mz-fuzzy

Makefile/configure - fix of recursive 'make clean' call when using 'make -B'

- fix of cleaning wrong library name
Signed-off-by: default avatarmz-fuzzy <mzfuzzy800@gmail.com>
parent 061341ed
......@@ -62,11 +62,11 @@ cleanconfig:
# clear build files
clean:
@echo "[Cleaning]"
rm -rf *.o $(LIBNAME).*
rm -rf *.o $(LIBNAME)
$(CONFIG_FILE):
@echo "[Running configure]"
@./configure
@./configure --no-clean
install: all install-libs install-headers
upload: all upload-libs upload-headers
......
......@@ -25,6 +25,7 @@ Building options:
--libname=<LIBNAME> Library name. [rf24]
--c_compiler=<CC> C compiler. [arm-linux-gnueabihf-gcc][gcc]
--cxx_compiler=<CXX> C++ compiler [arm-linux-gnueabihf-g++][g++]
--no-clean Don't clean previous build artifacts
Installation options:
--prefix=<PREFIX> Installation prefix path. [/usr/local]
......@@ -211,6 +212,9 @@ for opt do
--cxx_compiler=*)
CXX="$optarg"
;;
--no-clean*)
NO_CLEAN="1"
;;
--prefix=*)
PREFIX="$optarg"
;;
......@@ -428,7 +432,10 @@ for param in ${params}; do
fi
done
echo "[SECTION] Cleaning previous builds."
make clean >/dev/null
if [ -z "${NO_CLEAN}" ]; then
echo "[SECTION] Cleaning previous builds."
make clean >/dev/null
fi
echo "[OK] Finished."
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment