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: ...@@ -62,11 +62,11 @@ cleanconfig:
# clear build files # clear build files
clean: clean:
@echo "[Cleaning]" @echo "[Cleaning]"
rm -rf *.o $(LIBNAME).* rm -rf *.o $(LIBNAME)
$(CONFIG_FILE): $(CONFIG_FILE):
@echo "[Running configure]" @echo "[Running configure]"
@./configure @./configure --no-clean
install: all install-libs install-headers install: all install-libs install-headers
upload: all upload-libs upload-headers upload: all upload-libs upload-headers
......
...@@ -25,6 +25,7 @@ Building options: ...@@ -25,6 +25,7 @@ Building options:
--libname=<LIBNAME> Library name. [rf24] --libname=<LIBNAME> Library name. [rf24]
--c_compiler=<CC> C compiler. [arm-linux-gnueabihf-gcc][gcc] --c_compiler=<CC> C compiler. [arm-linux-gnueabihf-gcc][gcc]
--cxx_compiler=<CXX> C++ compiler [arm-linux-gnueabihf-g++][g++] --cxx_compiler=<CXX> C++ compiler [arm-linux-gnueabihf-g++][g++]
--no-clean Don't clean previous build artifacts
Installation options: Installation options:
--prefix=<PREFIX> Installation prefix path. [/usr/local] --prefix=<PREFIX> Installation prefix path. [/usr/local]
...@@ -211,6 +212,9 @@ for opt do ...@@ -211,6 +212,9 @@ for opt do
--cxx_compiler=*) --cxx_compiler=*)
CXX="$optarg" CXX="$optarg"
;; ;;
--no-clean*)
NO_CLEAN="1"
;;
--prefix=*) --prefix=*)
PREFIX="$optarg" PREFIX="$optarg"
;; ;;
...@@ -428,7 +432,10 @@ for param in ${params}; do ...@@ -428,7 +432,10 @@ for param in ${params}; do
fi fi
done done
echo "[SECTION] Cleaning previous builds." if [ -z "${NO_CLEAN}" ]; then
make clean >/dev/null echo "[SECTION] Cleaning previous builds."
make clean >/dev/null
fi
echo "[OK] Finished." 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