Create output directory for bin2hex before compiling 9/head
authorEugene Krasnikov <k.eugene.e@gmail.com>
Wed, 3 Apr 2013 18:40:57 +0000 (20:40 +0200)
committerEugene Krasnikov <k.eugene.e@gmail.com>
Fri, 5 Apr 2013 15:12:16 +0000 (17:12 +0200)
If target_firmware/magpie_fw_dev/build/utility/bin is not created
before compiling bin2hex build will fail.

Signed-off-by: Eugene Krasnikov <k.eugene.e@gmail.com>
target_firmware/magpie_fw_dev/build/utility/Makefile
target_firmware/magpie_fw_dev/build/utility/bin2hex/Makefile

index 2fdce936f142c8f3bf770cb9b5a9db42fa86d5c4..a7f6581958a314a51ac07fc223701dcfceb05dc0 100755 (executable)
@@ -1,7 +1,10 @@
 DIRS = bin2hex
+TARGET_DIR = ./bin
 
 all:
+       @mkdir -p $(TARGET_DIR)
        @for i in $(DIRS) ; do $(MAKE) -C $$i || exit $? ; done
 
 clean :
        @for i in $(DIRS) ; do $(MAKE) -C $$i clean; done
+       @rm -r $(TARGET_DIR)
index 4dacafdb81c4fc237972999bc50fe7018fee28d0..6a33d4e3f8db66a49788ed6f357dd91089776df7 100755 (executable)
@@ -1,10 +1,11 @@
 TARGET = ../bin/bin2hex                # for Linux environment
-
+TARGET_DIR = ../bin
 E=echo
 
 all: $(TARGET)
 
 $(TARGET):
+       @mkdir -p $(TARGET_DIR)
        gcc -o $(TARGET) bin2hex.c
        @$(E) "  CC " $@