aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Starkjohann <cs+github@obdev.at>2012-12-06 11:07:18 +0100
committerChristian Starkjohann <cs+github@obdev.at>2012-12-06 11:07:18 +0100
commitcc9687d66a290563fac7fe537cd1b71508e2dfae (patch)
treeaeb9c34b68e38949c279e427d5763ff0c65112b7
parent887ea7959ff268dcebd6bf5d14fd6bedfd100834 (diff)
downloadv-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--Makefile9
1 files changed, 6 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 2155fae..a6eb8a5 100644
--- a/Makefile
+++ b/Makefile
@@ -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'); \