temperaturecontrol: allow setting background tool without activating
[clinton/Smoothieware.git] / makefile
dissimilarity index 99%
index a612509..9a10c92 100644 (file)
--- a/makefile
+++ b/makefile
@@ -1,63 +1,35 @@
-# Copyright 2011 Adam Green (http://mbed.org/users/AdamGreen/)\r
-#\r
-# Licensed under the Apache License, Version 2.0 (the "License");\r
-# you may not use this file except in compliance with the License.\r
-# You may obtain a copy of the License at\r
-#\r
-#     http://www.apache.org/licenses/LICENSE-2.0\r
-#\r
-# Unless required by applicable law or agreed to in writing, software\r
-# distributed under the License is distributed on an "AS IS" BASIS,\r
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-# See the License for the specific language governing permissions and\r
-# limitations under the License.\r
-PROJECT=main\r
-GCC4MBED_DIR=./gcc4mbed\r
-INCDIRS=\r
-LIBS_PREFIX=\r
-LIBS_SUFFIX=\r
-SRC=./src\r
-\r
-#GCC4MBED_TYPE=Debug\r
-#GCC4MBED_TYPE=Release\r
-GCC4MBED_TYPE=Checked\r
-\r
-# Set to 1 to allow MRI debug monitor to take full control of UART0 and use it\r
-# as a dedicated debug channel.  If you are using the USB based serial port for\r
-# the console then this should cause you no problems.  Set MRI_BREAK_ON_INIT to\r
-# 0 if you don't want to break into GDB at startup.\r
-ENABLE_DEBUG_MONITOR?=0\r
-\r
-ifeq "$(ENABLE_DEBUG_MONITOR)" "1"\r
-# Can add MRI_UART_BAUD=115200 to next line if GDB fails to connect to MRI.\r
-# Tends to happen on some Linux distros but not Windows and OS X.\r
-MRI_UART=MRI_UART_0\r
-MRI_BREAK_ON_INIT=1\r
-MRI_SEMIHOST_STDIO=1\r
-else\r
-MRI_UART=MRI_UART_0 MRI_UART_SHARE\r
-MRI_BREAK_ON_INIT=0\r
-MRI_SEMIHOST_STDIO=0\r
-endif\r
-\r
-CONSOLE=/dev/ttyUSB0\r
-\r
-include ./gcc4mbed/build/gcc4mbed.mk\r
-\r
-.PHONY: debug-store flash upload debug console\r
-\r
-debug-store: $(PROJECT).elf\r
-       cp $(PROJECT).elf $(PROJECT)_lastupload.elf\r
-\r
-flash: $(PROJECT).hex debug-store\r
-       lpc21isp $< $(CONSOLE) 115200 12000\r
-\r
-upload: $(PROJECT).bin debug-store\r
-       dfu-util -d 1d50:6015 -R -D $<\r
-\r
-debug: $(PROJECT)_lastupload.elf\r
-       arm-none-eabi-gdb $< -ex  "set target-charset ASCII" -ex "set remotelogfile mri.log" -ex "target remote $(CONSOLE)"\r
-\r
-console:\r
-       stty raw ignbrk -echo 2000000 < $(CONSOLE)\r
-       ( cat <&3 & cat >&3 ; kill %% ) 3<>$(CONSOLE)\r
+#!/usr/bin/make
+
+DIRS = mbed src
+DIRSCLEAN = $(addsuffix .clean,$(DIRS))
+
+all:
+       @ $(MAKE) -C mbed
+       @echo Building Smoothie
+       @ $(MAKE) -C src
+
+clean: $(DIRSCLEAN)
+
+$(DIRSCLEAN): %.clean:
+       @echo Cleaning $*
+       @ $(MAKE) -C $*  clean
+
+debug-store:
+       @ $(MAKE) -C src debug-store
+
+flash:
+       @ $(MAKE) -C src flash
+
+dfu:
+       @ $(MAKE) -C src dfu
+
+upload:
+       @ $(MAKE) -C src upload
+
+debug:
+       @ $(MAKE) -C src debug
+
+console:
+       @ $(MAKE) -C src console
+
+.PHONY: all $(DIRS) $(DIRSCLEAN) debug-store flash upload debug console dfu