Makefiles: Updated for build on BSD
authorMichel Pollet <buserror@gmail.com>
Fri, 18 May 2012 11:43:53 +0000 (12:43 +0100)
committerMichel Pollet <buserror@gmail.com>
Fri, 18 May 2012 11:43:53 +0000 (12:43 +0100)
Remove reference to explicit 'make' and /bin/bash

Signed-off-by: Michel Pollet <buserror@gmail.com>
13 files changed:
Makefile
Makefile.common
examples/Makefile
examples/board_hd77480/Makefile
examples/board_i2ctest/Makefile
examples/board_ledramp/Makefile
examples/board_reprap/Makefile
examples/board_simduino/Makefile
examples/board_timer_64led/Makefile
examples/board_usb/Makefile
examples/vhci/Makefile
simavr/Makefile
tests/Makefile

index df054e3..ec70365 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,15 +1,15 @@
-all:   make-simavr make-tests make-examples
+all:   $(MAKE)-simavr $(MAKE)-tests $(MAKE)-examples
 
-make-simavr:
-       make -C simavr
+$(MAKE)-simavr:
+       $(MAKE) -C simavr
 
-make-tests: make-simavr
-       make -C tests
+$(MAKE)-tests: $(MAKE)-simavr
+       $(MAKE) -C tests
 
-make-examples: make-simavr
-       make -C examples
+$(MAKE)-examples: $(MAKE)-simavr
+       $(MAKE) -C examples
 
 clean:
-       make -C simavr clean
-       make -C tests clean
-       make -C examples clean
+       $(MAKE) -C simavr clean
+       $(MAKE) -C tests clean
+       $(MAKE) -C examples clean
index 32edccc..6c52f1d 100644 (file)
@@ -57,6 +57,7 @@ AR                    ?= ar
 RANLIB                 ?= ranlib
 MKDIR          ?= mkdir -p
 INSTALL                ?= install
+SHELL          := ${shell which bash}
 
 # simavr directory
 SIMAVR         ?= ${shell for p in . .. ../.. ../../..;do test -d $$p/simavr/sim && echo $$p/simavr; done}
index b08ba6f..680d0b7 100644 (file)
@@ -8,8 +8,8 @@ boards=$(boards_base)
 endif
 
 all:
-       for bi in ${boards}; do make -C $$bi; done
+       for bi in ${boards}; do $(MAKE) -C $$bi; done
 
 clean:
-       for bi in ${boards}; do make -C $$bi clean; done
+       for bi in ${boards}; do $(MAKE) -C $$bi clean; done
 
index ed1a883..dcae864 100644 (file)
@@ -21,8 +21,6 @@ firm_src = ${wildcard at*${board}.c}
 firmware = ${firm_src:.c=.axf}
 simavr = ../../
 
-SHELL   = /bin/bash
-
 IPATH = .
 IPATH += ../parts
 IPATH += ${simavr}/include
index 651f081..ec0197b 100644 (file)
@@ -21,8 +21,6 @@ firm_src = ${wildcard at*${board}.c}
 firmware = ${firm_src:.c=.axf}
 simavr = ../..
 
-SHELL   = /bin/bash
-
 IPATH = .
 IPATH += ${simavr}/examples/shared
 IPATH += ${simavr}/examples/parts
index 09161f0..6a537d2 100644 (file)
@@ -21,8 +21,6 @@ firm_src = ${wildcard at*${board}.c}
 firmware = ${firm_src:.c=.axf}
 simavr = ../../
 
-SHELL   = /bin/bash
-
 IPATH = .
 IPATH += ../parts
 IPATH += ${simavr}/include
index 51d9eeb..83b84ed 100644 (file)
@@ -21,8 +21,6 @@ firm_src = ${wildcard atmega*.c}
 firmware = ${firm_src:.c=.hex}
 simavr = ../../
 
-SHELL   = /bin/bash
-
 IPATH = .
 IPATH += src
 IPATH += ../parts
index b929a2f..75de2bf 100644 (file)
@@ -21,8 +21,6 @@ firm_src = ${wildcard atmega*.c}
 firmware = ${firm_src:.c=.hex}
 simavr = ../../
 
-SHELL   = /bin/bash
-
 IPATH = .
 IPATH += ../parts
 IPATH += ${simavr}/include
index 35fe216..665025f 100644 (file)
@@ -21,8 +21,6 @@ firm_src = ${wildcard at*${target}.c}
 firmware = ${firm_src:.c=.axf}
 simavr = ../../
 
-SHELL   = /bin/bash
-
 IPATH = .
 IPATH += ../parts
 IPATH += ${simavr}/include
index 410b9d4..9aa7f47 100644 (file)
@@ -21,8 +21,6 @@ firm_src = at90usb162_cdc_loopback.c
 firmware = ${firm_src:.c=.hex}
 simavr = ../../
 
-SHELL   = /bin/bash
-
 IPATH = .
 IPATH += ../parts
 IPATH += ../vhci/include
@@ -47,14 +45,14 @@ ${board} : ${OBJ}/${target}.o
 
 ../vhci/lib/libusb_vhci.a:
        @echo -n "BUILDIN $@ "
-       @{ make -j -C ../vhci >/tmp/vhci.build.log 2>&1 || \
+       @{ $(MAKE) -j -C ../vhci >/tmp/vhci.build.log 2>&1 || \
                { echo "ERROR check /tmp/vhci.build.log"; exit 1; }; } && \
                        echo " Done" 
 
 vhci : ../vhci/lib/libusb_vhci.a 
 
 clean-vhci:
-       make -C ../vhci clean
+       $(MAKE) -C ../vhci clean
 
 ${target}: vhci ${board}
        @echo $@ done
index fd624ef..0164152 100644 (file)
@@ -18,7 +18,7 @@ all: library
 module: vhci-hcd-$(HCD_V)/usb-vhci-hcd.ko
 
 vhci-hcd-$(HCD_V)/usb-vhci-hcd.ko: vhci-hcd-$(HCD_V)
-       make -C vhci-hcd-$(HCD_V) \
+       $(MAKE) -C vhci-hcd-$(HCD_V) \
                KDIR=/lib/modules/${shell uname -r}/build \
                CORE_INCLUDE_DIR=$(PWD)/vhci-hcd-$(HCD_V)/linux/2.6.32/drivers/usb/core
 
@@ -37,7 +37,7 @@ lib/libusb_vhci.a: module libusb_vhci-$(VHCI_V)
        ln -snf vhci-hcd-$(HCD_V) linux && \
                cd libusb_vhci-$(VHCI_V) && \
                ./configure --prefix=$(PWD) CPPFLAGS="-I$(PWD)" --enable-static --disable-shared && \
-                       make -j && make install
+                       $(MAKE) -j && $(MAKE) install
 
 libusb_vhci-$(VHCI_V).tar.bz2:
        wget $(BASE_URL)/native%20libraries/libusb_vhci-$(VHCI_V).tar.bz2
index 17e69aa..ae34c63 100644 (file)
@@ -18,7 +18,6 @@
 
 SIMAVR_VERSION = 1.0a10
 SIMAVR_REVISION        = 1
-SHELL=/bin/bash
 
 target = run_avr
 
index 007dbb2..922312c 100644 (file)
@@ -20,9 +20,6 @@
 #      You should have received a copy of the GNU General Public License
 #      along with simavr.  If not, see <http://www.gnu.org/licenses/>.
 
-
-SHELL          = /bin/bash
-
 sources                := $(wildcard at*.c)
 simavr                 = ..