mirror of https://github.com/ArduPilot/ardupilot
updated make file for cygwin compatibility
git-svn-id: https://arducopter.googlecode.com/svn/trunk@3277 f9c3cf11-9bcb-44bc-f272-b75c42450872
This commit is contained in:
parent
402f0c69fa
commit
6dbfd78197
|
@ -96,6 +96,8 @@ ifneq ($(findstring CYGWIN, $(SYSTYPE)),)
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# Jump over the next makefile sections when runing a "make configure"
|
||||||
|
ifneq ($(MAKECMDGOALS),configure)
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
# Config options
|
# Config options
|
||||||
|
@ -130,7 +132,7 @@ ifeq ($(ARDUINO),)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(SYSTYPE),Linux)
|
ifeq ($(SYSTYPE),Linux)
|
||||||
ARDUINO_SEARCHPATH = /usr/share/arduino /usr/local/share/arduino /usr/bin/arduino
|
ARDUINO_SEARCHPATH = /usr/share/arduino* /usr/local/share/arduino*
|
||||||
ARDUINOS := $(wildcard $(ARDUINO_SEARCHPATH))
|
ARDUINOS := $(wildcard $(ARDUINO_SEARCHPATH))
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -257,12 +259,7 @@ SKETCHCPP_SRC := $(SKETCHPDE) $(sort $(filter-out $(SKETCHPDE),$(SKETCHPDESRCS)
|
||||||
# make.
|
# make.
|
||||||
#
|
#
|
||||||
SEXPR = 's/^[[:space:]]*\#include[[:space:]][<\"]([^>\"./]+).*$$/\1/p'
|
SEXPR = 's/^[[:space:]]*\#include[[:space:]][<\"]([^>\"./]+).*$$/\1/p'
|
||||||
ifneq ($(findstring CYGWIN, $(SYSTYPE)),)
|
LIBTOKENS := $(sort $(shell cat $(SKETCHPDESRCS) $(SKETCHSRCS) | sed -nre $(SEXPR)))
|
||||||
# Workaround a cygwin issue
|
|
||||||
LIBTOKENS := $(sort $(shell cat $(SKETCHPDESRCS) $(SKETCHSRCS) | sed -nre $(SEXPR)))
|
|
||||||
else
|
|
||||||
LIBTOKENS := $(sort $(shell cat $(SKETCHPDESRCS) $(SKETCHSRCS) | sed -nEe $(SEXPR)))
|
|
||||||
endif
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Find sketchbook libraries referenced by the sketch.
|
# Find sketchbook libraries referenced by the sketch.
|
||||||
|
@ -361,6 +358,7 @@ ALLOBJS = $(SKETCHOBJS) $(LIBOBJS) $(CORELIBOBJS)
|
||||||
|
|
||||||
# All of the dependency files that may be generated
|
# All of the dependency files that may be generated
|
||||||
ALLDEPS = $(ALLOBJS:%.o=%.d)
|
ALLDEPS = $(ALLOBJS:%.o=%.d)
|
||||||
|
endif
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
# Targets
|
# Targets
|
||||||
|
@ -372,6 +370,12 @@ all: $(SKETCHELF) $(SKETCHEEP) $(SKETCHHEX)
|
||||||
upload: $(SKETCHHEX)
|
upload: $(SKETCHHEX)
|
||||||
avrdude -c $(UPLOAD_PROTOCOL) -p $(MCU) -P $(PORT) -b$(UPLOAD_SPEED) -U $(SKETCHHEX)
|
avrdude -c $(UPLOAD_PROTOCOL) -p $(MCU) -P $(PORT) -b$(UPLOAD_SPEED) -U $(SKETCHHEX)
|
||||||
|
|
||||||
|
configure:
|
||||||
|
$(warning WARNING - A $(SKETCHBOOK)/config.mk file has been written)
|
||||||
|
$(warning Please edit the file to match your system configuration, if you use a different board or port)
|
||||||
|
@echo BOARD=mega > $(SKETCHBOOK)/config.mk
|
||||||
|
@echo PORT=/dev/null >> $(SKETCHBOOK)/config.mk
|
||||||
|
|
||||||
debug:
|
debug:
|
||||||
avarice --mkII --capture --jtag usb :4242 & \
|
avarice --mkII --capture --jtag usb :4242 & \
|
||||||
gnome-terminal -x avr-gdb $(SKETCHELF) & \
|
gnome-terminal -x avr-gdb $(SKETCHELF) & \
|
||||||
|
|
Loading…
Reference in New Issue