diff options
author | Christian Starkjohann <cs+github@obdev.at> | 2012-12-06 11:07:18 +0100 |
---|---|---|
committer | Christian Starkjohann <cs+github@obdev.at> | 2012-12-06 11:07:18 +0100 |
commit | cc9687d66a290563fac7fe537cd1b71508e2dfae (patch) | |
tree | aeb9c34b68e38949c279e427d5763ff0c65112b7 | |
parent | 887ea7959ff268dcebd6bf5d14fd6bedfd100834 (diff) | |
download | v-usb-cc9687d66a290563fac7fe537cd1b71508e2dfae.tar.gz v-usb-cc9687d66a290563fac7fe537cd1b71508e2dfae.tar.bz2 v-usb-cc9687d66a290563fac7fe537cd1b71508e2dfae.zip |
Improved main Makefile to build for the host platform when no target specified.
-rw-r--r-- | Makefile | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -19,9 +19,10 @@ all: if [ ! -f examples/hid-mouse/firmware/Makefile ]; then \ $(MAKE) files; \ fi - $(MAKE) unix - if cross-make.sh --help >/dev/null 2>&1; then \ + if [ -n "$(uname -s | grep -i mingw)" ]; then \ $(MAKE) windows; \ + else \ + $(MAKE) unix; \ fi clean: @@ -49,7 +50,9 @@ unix unixclean: windows windowsclean: target=$$(echo $@ | sed -e 's/windows//g'); \ - find . -mindepth 3 -name Makefile.windows -execdir cross-make.sh $$target \; + find . -mindepth 3 -name Makefile.windows -execdir cross-make.sh $$target \; ; \ + if [ -z "$$target" ]; then target=hex; fi; \ + find . -mindepth 2 -name firmware -exec sh -c "cd '{}'; $(MAKE) $$target" \; files filesremove: target=$$(echo $@ | sed -e 's/files//g'); \ |