From 2215adbdec3b89b5c9bd8128537541a41fe741ee Mon Sep 17 00:00:00 2001 From: Michel Pollet Date: Fri, 18 May 2012 12:43:53 +0100 Subject: [PATCH] Makefiles: Updated for build on BSD Remove reference to explicit 'make' and /bin/bash Signed-off-by: Michel Pollet --- Makefile | 20 ++++++++++---------- Makefile.common | 1 + examples/Makefile | 4 ++-- examples/board_hd77480/Makefile | 2 -- examples/board_i2ctest/Makefile | 2 -- examples/board_ledramp/Makefile | 2 -- examples/board_reprap/Makefile | 2 -- examples/board_simduino/Makefile | 2 -- examples/board_timer_64led/Makefile | 2 -- examples/board_usb/Makefile | 6 ++---- examples/vhci/Makefile | 4 ++-- simavr/Makefile | 1 - tests/Makefile | 3 --- 13 files changed, 17 insertions(+), 34 deletions(-) diff --git a/Makefile b/Makefile index df054e3..ec70365 100644 --- 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 diff --git a/Makefile.common b/Makefile.common index 32edccc..6c52f1d 100644 --- a/Makefile.common +++ b/Makefile.common @@ -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} diff --git a/examples/Makefile b/examples/Makefile index b08ba6f..680d0b7 100644 --- a/examples/Makefile +++ b/examples/Makefile @@ -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 diff --git a/examples/board_hd77480/Makefile b/examples/board_hd77480/Makefile index ed1a883..dcae864 100644 --- a/examples/board_hd77480/Makefile +++ b/examples/board_hd77480/Makefile @@ -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 diff --git a/examples/board_i2ctest/Makefile b/examples/board_i2ctest/Makefile index 651f081..ec0197b 100644 --- a/examples/board_i2ctest/Makefile +++ b/examples/board_i2ctest/Makefile @@ -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 diff --git a/examples/board_ledramp/Makefile b/examples/board_ledramp/Makefile index 09161f0..6a537d2 100644 --- a/examples/board_ledramp/Makefile +++ b/examples/board_ledramp/Makefile @@ -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 diff --git a/examples/board_reprap/Makefile b/examples/board_reprap/Makefile index 51d9eeb..83b84ed 100644 --- a/examples/board_reprap/Makefile +++ b/examples/board_reprap/Makefile @@ -21,8 +21,6 @@ firm_src = ${wildcard atmega*.c} firmware = ${firm_src:.c=.hex} simavr = ../../ -SHELL = /bin/bash - IPATH = . IPATH += src IPATH += ../parts diff --git a/examples/board_simduino/Makefile b/examples/board_simduino/Makefile index b929a2f..75de2bf 100644 --- a/examples/board_simduino/Makefile +++ b/examples/board_simduino/Makefile @@ -21,8 +21,6 @@ firm_src = ${wildcard atmega*.c} firmware = ${firm_src:.c=.hex} simavr = ../../ -SHELL = /bin/bash - IPATH = . IPATH += ../parts IPATH += ${simavr}/include diff --git a/examples/board_timer_64led/Makefile b/examples/board_timer_64led/Makefile index 35fe216..665025f 100644 --- a/examples/board_timer_64led/Makefile +++ b/examples/board_timer_64led/Makefile @@ -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 diff --git a/examples/board_usb/Makefile b/examples/board_usb/Makefile index 410b9d4..9aa7f47 100644 --- a/examples/board_usb/Makefile +++ b/examples/board_usb/Makefile @@ -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 diff --git a/examples/vhci/Makefile b/examples/vhci/Makefile index fd624ef..0164152 100644 --- a/examples/vhci/Makefile +++ b/examples/vhci/Makefile @@ -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 diff --git a/simavr/Makefile b/simavr/Makefile index 17e69aa..ae34c63 100644 --- a/simavr/Makefile +++ b/simavr/Makefile @@ -18,7 +18,6 @@ SIMAVR_VERSION = 1.0a10 SIMAVR_REVISION = 1 -SHELL=/bin/bash target = run_avr diff --git a/tests/Makefile b/tests/Makefile index 007dbb2..922312c 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -20,9 +20,6 @@ # You should have received a copy of the GNU General Public License # along with simavr. If not, see . - -SHELL = /bin/bash - sources := $(wildcard at*.c) simavr = .. -- 2.39.5