brians | 343bc11 | 2013-02-10 01:53:46 +0000 | [diff] [blame] | 1 | |
| 2 | $excludes = [/Vision2009/,/CInterfaces/,/NetworkTables/,/SmartDashboard/,/Commands/,/Buttons/,/Preferences/,/swp$/] |
| 3 | |
| 4 | files = `find WPILib`.split(/\n/).collect do |file| |
| 5 | if(file =~ /.*\.cpp/) |
| 6 | file.gsub!(/cpp\Z/,"o") |
| 7 | $excludes.each do |exclude| |
| 8 | if(file && file =~ exclude) |
| 9 | file = nil |
| 10 | end |
| 11 | end |
| 12 | file |
| 13 | end |
| 14 | end.compact |
| 15 | |
| 16 | make = "make -f ../module.mk" |
| 17 | defines = "DEFINES=-D\'SVN_REV=\\\"2262\\\"\'" |
| 18 | added_includes = "ADDED_INCLUDES=-I./WPILib/" |
| 19 | outfile = "wpilib.out PROJECT_TARGET=wpilib.out" |
| 20 | objects = "PROJECT_OBJECTS=\"#{files.join(" ")}\"" |
| 21 | |
| 22 | cmd = "#{make} #{outfile} #{added_includes} #{defines} #{objects}" |
| 23 | system cmd |