Merge pull request #1333 from wolfmanjm/add-hold
[clinton/Smoothieware.git] / src / makefile
index c623f76..8858644 100644 (file)
@@ -72,7 +72,7 @@ ifeq "$(EXCLUDE_MODULES)" ""
 
 ifeq "$(CNC)" "1"
 # CNC build excludes these
-export EXCLUDE_MODULES = tools/filamentdetector tools/scaracal tools/temperaturecontrol tools/extruder
+export EXCLUDE_MODULES = tools/filamentdetector tools/scaracal tools/temperaturecontrol tools/temperatureswitch tools/extruder
 else
 # 3D build excludes these
 export EXCLUDE_MODULES = tools/drillingcycles tools/spindle
@@ -95,6 +95,11 @@ ifneq "$(AXIS)" ""
 DEFINES += -DMAX_ROBOT_ACTUATORS=$(AXIS)
 endif
 
+# define the number of primary (cartesian) axis must be >= MAX_ROBOT_ACTUATORS
+ifneq "$(PAXIS)" ""
+DEFINES += -DN_PRIMARY_AXIS=$(PAXIS)
+endif
+
 # set to not compile in any network support
 #export NONETWORK = 1
 
@@ -103,12 +108,17 @@ include $(BUILD_DIR)/build.mk
 CONSOLE?=/dev/arduino
 BAUD?=9600
 
-.PHONY: debug-store flash upload debug console dfu
+ifneq "$(OS)" "Windows_NT"
+COPY=cp
+else
+COPY=copy
+endif
 
+.PHONY: debug-store flash upload debug console dfu
 print-%  : ; @echo $* = $($*)
 
 debug-store: ../LPC1768/$(PROJECT).elf
-       cp ../LPC1768/$(PROJECT).elf ../LPC1768/$(PROJECT)_lastupload.elf
+       cd .. && cd LPC1768 && $(COPY) $(PROJECT).elf $(PROJECT)_lastupload.elf
 
 flash: ../LPC1768/$(PROJECT).hex debug-store
        lpc21isp $< $(CONSOLE) 115200 12000