Arduino 1.0 Makefile


hi guys,

i modified makefile arduino 018 works arduino 1.0 now. means can use favorite ide develop arduino (in case netbeans). latest makefile can found @ website:
http://www.kerrywong.com/2011/12/17/makefile-for-arduino-1-0/

and here original post on how use netbeans write arduino projects.
http://www.kerrywong.com/2010/05/16/arduino-development-using-netbeans/

since use linux, makefile tested under ubuntu 10.04 (64bit) should work on linux systems little or no modifications. windows users, think have change things little bit (for instance not sure /dev/ttyusb0 equivalent port on windows).


hello there,

first things first: great job alphazeta. tired fixing arduino makefile included in arduino-core package, used uncle google , tadam, here post.

i modified makefile more generic since wanted have 1 makefile sketches , copy proper dir , not have modify it.

here listed modifications:
code: [select]

cxx_modules = \
$(arduino)/tone.cpp \
$(arduino)/wmath.cpp \
$(arduino)/print.cpp \
$(arduino)/hardwareserial.cpp \
$(arduino)/cdc.cpp \
$(arduino)/hid.cpp \
$(arduino)/ipaddress.cpp \
$(arduino)/new.cpp \
$(arduino)/stream.cpp \
$(arduino)/usbcore.cpp \
$(arduino)/wmath.cpp \
$(arduino)/wstring.cpp \
$(arduino)/main.cpp \

cxx_modules += $(shell find $(arduino_lib)  -maxdepth 2 -mindepth 2 -type f -name *.cpp -exec /bin/echo -n " {}" \;)


the last line adds .cpp files in libraries directory compile list don't have add them when using library in sketch

code: [select]

cincs = -i$(arduino)  -i$(variants) -i$(arduino_lib)
cxxincs = -i$(arduino) -i$(variants) -i$(arduino_lib)

cincs += $(shell find $(arduino_lib) -mindepth 1 -maxdepth 2 -type d ! -name examples -exec /bin/echo -n " -i{} " \;)
cxxincs += $(shell find $(abduino_lib) -mindepth 1 -maxdepth 2 -type d ! -name examples -exec /bin/echo -n " -i{} " \;)


similarly, 2 bottom lines add dirs in arduino's library path include path.

code: [select]

applet/main.o:
        test -d applet || mkdir applet
        echo '#include "arduino.h"' > applet/main.cpp
        cat $(target).pde >> applet/main.cpp
        cat $(arduino)/main.cxx >> applet/main.cpp
        $(cxx) -c $(all_cxxflags) applet/main.cpp -o applet/main.o


minor bugfix, inspired makefile included in stock debian testing arduino package.

to avoid /usr/share/arduino/libraries/firmata/boards.h:8:25: error: floating constant in preprocessor expression changed
code: [select]
version=1.00
code: [select]
version=100

i use on debian wheezy (amd64) installed both arduino , arduino-core packages.

i'm open anny sugesstions, know it's not perfect (it compiles unneeded , unused libraries). hope helps anybody


Arduino Forum > Development > Other Software Development > Arduino 1.0 Makefile


arduino

Comments

Popular posts from this blog

Joomla site hacked, cant see front and - Joomla! Forum - community, help and support

Christian Home School Programs - Joomla! Forum - community, help and support

Trouble with PF_OutFlag_I_USE_AUDIO and PF_CHECKOUT_LAYER_AUDIO