You can find a much more comprehensive Makefile that will work with regular sketches and libraries here: http://code.google.com/p/arducopter/source/browse/trunk/libraries/AP_Common/Arduino.mkIt includes some fairly hairy awk that is quite faithful to the processing that Arduino performs on sketches; you can break it but not easily.
--- /Users/alex/Desktop/Inbox/Arduino.mk 2011-08-18 11:40:45.000000000 +1000+++ Arduino.mk 2011-08-18 11:29:38.000000000 +1000@@ -98,8 +100,8 @@ # ifeq ($(SYSTYPE),Darwin) # use Spotlight to find Arduino.app- ARDUINO_QUERY = 'kMDItemKind == Application && kMDItemDisplayName == Arduino.app'- ARDUINOS := $(addsuffix /Contents/Resources/Java,$(shell mdfind -literal $(ARDUINO_QUERY)))+ ARDUINO_QUERY = 'Arduino.app kind:Application'+ ARDUINOS := $(addsuffix /Contents/Resources/Java,$(shell mdfind $(ARDUINO_QUERY))) ifeq ($(ARDUINOS),) $(error ERROR: Spotlight cannot find Arduino on your system.) endif
Please enter a valid email to subscribe
We need to confirm your email address.
To complete the subscription, please click the link in the
email we just sent you.
Thank you for subscribing!
via Egeo 16