Skip to content

Commit 2215adb

Browse files
committed
Makefiles: Updated for build on BSD
Remove reference to explicit 'make' and /bin/bash Signed-off-by: Michel Pollet <[email protected]>
1 parent bb4699b commit 2215adb

File tree

13 files changed

+17
-34
lines changed

13 files changed

+17
-34
lines changed

Makefile

+10-10
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
all: make-simavr make-tests make-examples
1+
all: $(MAKE)-simavr $(MAKE)-tests $(MAKE)-examples
22

3-
make-simavr:
4-
make -C simavr
3+
$(MAKE)-simavr:
4+
$(MAKE) -C simavr
55

6-
make-tests: make-simavr
7-
make -C tests
6+
$(MAKE)-tests: $(MAKE)-simavr
7+
$(MAKE) -C tests
88

9-
make-examples: make-simavr
10-
make -C examples
9+
$(MAKE)-examples: $(MAKE)-simavr
10+
$(MAKE) -C examples
1111

1212
clean:
13-
make -C simavr clean
14-
make -C tests clean
15-
make -C examples clean
13+
$(MAKE) -C simavr clean
14+
$(MAKE) -C tests clean
15+
$(MAKE) -C examples clean

Makefile.common

+1
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ AR ?= ar
5757
RANLIB ?= ranlib
5858
MKDIR ?= mkdir -p
5959
INSTALL ?= install
60+
SHELL := ${shell which bash}
6061

6162
# simavr directory
6263
SIMAVR ?= ${shell for p in . .. ../.. ../../..;do test -d $$p/simavr/sim && echo $$p/simavr; done}

examples/Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ boards=$(boards_base)
88
endif
99

1010
all:
11-
for bi in ${boards}; do make -C $$bi; done
11+
for bi in ${boards}; do $(MAKE) -C $$bi; done
1212

1313
clean:
14-
for bi in ${boards}; do make -C $$bi clean; done
14+
for bi in ${boards}; do $(MAKE) -C $$bi clean; done
1515

examples/board_hd77480/Makefile

-2
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@ firm_src = ${wildcard at*${board}.c}
2121
firmware = ${firm_src:.c=.axf}
2222
simavr = ../../
2323

24-
SHELL = /bin/bash
25-
2624
IPATH = .
2725
IPATH += ../parts
2826
IPATH += ${simavr}/include

examples/board_i2ctest/Makefile

-2
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@ firm_src = ${wildcard at*${board}.c}
2121
firmware = ${firm_src:.c=.axf}
2222
simavr = ../..
2323

24-
SHELL = /bin/bash
25-
2624
IPATH = .
2725
IPATH += ${simavr}/examples/shared
2826
IPATH += ${simavr}/examples/parts

examples/board_ledramp/Makefile

-2
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@ firm_src = ${wildcard at*${board}.c}
2121
firmware = ${firm_src:.c=.axf}
2222
simavr = ../../
2323

24-
SHELL = /bin/bash
25-
2624
IPATH = .
2725
IPATH += ../parts
2826
IPATH += ${simavr}/include

examples/board_reprap/Makefile

-2
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@ firm_src = ${wildcard atmega*.c}
2121
firmware = ${firm_src:.c=.hex}
2222
simavr = ../../
2323

24-
SHELL = /bin/bash
25-
2624
IPATH = .
2725
IPATH += src
2826
IPATH += ../parts

examples/board_simduino/Makefile

-2
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@ firm_src = ${wildcard atmega*.c}
2121
firmware = ${firm_src:.c=.hex}
2222
simavr = ../../
2323

24-
SHELL = /bin/bash
25-
2624
IPATH = .
2725
IPATH += ../parts
2826
IPATH += ${simavr}/include

examples/board_timer_64led/Makefile

-2
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@ firm_src = ${wildcard at*${target}.c}
2121
firmware = ${firm_src:.c=.axf}
2222
simavr = ../../
2323

24-
SHELL = /bin/bash
25-
2624
IPATH = .
2725
IPATH += ../parts
2826
IPATH += ${simavr}/include

examples/board_usb/Makefile

+2-4
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@ firm_src = at90usb162_cdc_loopback.c
2121
firmware = ${firm_src:.c=.hex}
2222
simavr = ../../
2323

24-
SHELL = /bin/bash
25-
2624
IPATH = .
2725
IPATH += ../parts
2826
IPATH += ../vhci/include
@@ -47,14 +45,14 @@ ${board} : ${OBJ}/${target}.o
4745

4846
../vhci/lib/libusb_vhci.a:
4947
@echo -n "BUILDIN $@ "
50-
@{ make -j -C ../vhci >/tmp/vhci.build.log 2>&1 || \
48+
@{ $(MAKE) -j -C ../vhci >/tmp/vhci.build.log 2>&1 || \
5149
{ echo "ERROR check /tmp/vhci.build.log"; exit 1; }; } && \
5250
echo " Done"
5351

5452
vhci : ../vhci/lib/libusb_vhci.a
5553

5654
clean-vhci:
57-
make -C ../vhci clean
55+
$(MAKE) -C ../vhci clean
5856

5957
${target}: vhci ${board}
6058
@echo $@ done

examples/vhci/Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ all: library
1818
module: vhci-hcd-$(HCD_V)/usb-vhci-hcd.ko
1919

2020
vhci-hcd-$(HCD_V)/usb-vhci-hcd.ko: vhci-hcd-$(HCD_V)
21-
make -C vhci-hcd-$(HCD_V) \
21+
$(MAKE) -C vhci-hcd-$(HCD_V) \
2222
KDIR=/lib/modules/${shell uname -r}/build \
2323
CORE_INCLUDE_DIR=$(PWD)/vhci-hcd-$(HCD_V)/linux/2.6.32/drivers/usb/core
2424

@@ -37,7 +37,7 @@ lib/libusb_vhci.a: module libusb_vhci-$(VHCI_V)
3737
ln -snf vhci-hcd-$(HCD_V) linux && \
3838
cd libusb_vhci-$(VHCI_V) && \
3939
./configure --prefix=$(PWD) CPPFLAGS="-I$(PWD)" --enable-static --disable-shared && \
40-
make -j && make install
40+
$(MAKE) -j && $(MAKE) install
4141

4242
libusb_vhci-$(VHCI_V).tar.bz2:
4343
wget $(BASE_URL)/native%20libraries/libusb_vhci-$(VHCI_V).tar.bz2

simavr/Makefile

-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818

1919
SIMAVR_VERSION = 1.0a10
2020
SIMAVR_REVISION = 1
21-
SHELL=/bin/bash
2221

2322
target = run_avr
2423

tests/Makefile

-3
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,6 @@
2020
# You should have received a copy of the GNU General Public License
2121
# along with simavr. If not, see <http://www.gnu.org/licenses/>.
2222

23-
24-
SHELL = /bin/bash
25-
2623
sources := $(wildcard at*.c)
2724
simavr = ..
2825

0 commit comments

Comments
 (0)