This is the new make file build structure for robot development.
This structure ...
depends only on gnu make and bash beyond the FIRST tools. It should work on a variety of platforms and should be easy to bring up on new platforms.
is cross platform. It runs on cygwin on windows, linux, and mac os. (I have not tried it on mac os but it should run there.)
runs the existing test code for the existing robot, including running with valgrind when running on linux
adds the ability to have a robot directory named common to share code common to multiple robots
expects the FRC compilers to be installed on linux and mac os but uses a copy in the repository for cygwin
stores the necessary external software (CTRE, NavX, WPIlib) required to build the robot software as part of the repository so it is easy to get builds up and running. No more searching for just the right version of some external software.
The layout of this repository is
robotdev
At the top level of a robot (e.g. robots/theremin)
make CONFIG=cfg
make CONFIG=cfg tests
make CONFIG=cfg robotsw
make CONFIG=cfg deploy
Within a subdirectory of a robot,
make CONFIG=cfg
make CONFIG=cfg tests
make CONFIG=cfg deploy
--------------------------------------------------------------1
Notes: For all make targets, the CONFIG option must be specified. The config option can be 'debug' or 'release' with no quotes.
By default a short message indicating build steps is displayed. If VERBOSE=1 is set on the make invocation then the full build command line is displayed. (e.g. make CONFIG=debug VERBOSE=1)
Running a 'tests' target requires the dependencies be generated, but building tests does not generate them. Therefore, the robot target must be built in a given directory first then the tests will have the needed dependency files.