copied everything over from 2012 and removed all of the actual robot code except the drivetrain stuff
git-svn-id: https://robotics.mvla.net/svn/frc971/2013/trunk/src@4078 f308d9b7-e957-4cde-b6ac-9a88185e7312
diff --git a/aos/build/swig.gypi b/aos/build/swig.gypi
new file mode 100644
index 0000000..2e99a95
--- /dev/null
+++ b/aos/build/swig.gypi
@@ -0,0 +1,73 @@
+# Include this file in any target that needs to use swig wrappers.
+#
+# To use, create a target of the following form:
+# {
+# 'target_name': 'my_target_javawrap',
+# 'type': 'static_library', # or any other type that can handle .cc files
+# 'sources': [
+# 'aos/example/target.swig',
+# ],
+# 'variables': {
+# 'package': 'aos.test',
+# },
+# 'includes': ['path/to/swig.gypi'],
+# },
+# Code that depends on this target will be able to use the swig wrapped
+# java classes.
+#
+# using <http://src.chromium.org/svn/trunk/src/build/protoc.gypi> as an
+# example of how this should work
+{
+ 'variables': {
+ 'prefix_dir': '<(SHARED_INTERMEDIATE_DIR)/',
+ 'out_dir': '<(prefix_dir)/<(_target_name)/',
+ 'output_java_wrap': '<(out_dir)/<(RULE_INPUT_ROOT)_wrap.cc',
+ 'java_dir': '<(out_dir)/<(RULE_INPUT_ROOT)_java',
+ 'no_rsync': 1,
+ },
+ 'rules': [
+ {
+ 'rule_name': 'genswig',
+ 'extension': 'swig',
+ 'outputs': [
+ '<(output_java_wrap)',
+ '<(java_dir)',
+ ],
+ 'action': [
+ '<(DEPTH)/aos/build/mkdirswig',
+ '<(java_dir)',
+ '-I<(DEPTH)',
+ '-outdir', ' <(java_dir)',
+ '-package', '<(package)',
+ '-o', '<(output_java_wrap)',
+ '-c++',
+ '-Wall',
+ '-Wextra',
+ '-java',
+ '<(RULE_INPUT_PATH)'],
+ 'message': 'Generating C++ code from <(RULE_INPUT_DIRNAME)/<(RULE_INPUT_ROOT).swig',
+ 'process_outputs_as_sources': 1,
+ },
+ ],
+ 'cflags': [
+# For the swig-generated C++ code.
+ '-fno-strict-aliasing',
+ '-Wno-cast-qual',
+ ],
+ 'include_dirs': [
+ '<(prefix_dir)/<(_target_name)',
+ '/usr/lib/jvm/default-java/include',
+ '/usr/lib/jvm/default-java/include/linux',
+ ],
+ 'direct_dependent_settings': {
+ 'include_dirs': [
+ '<(prefix_dir)/<(_target_name)',
+ '/usr/lib/jvm/default-java/include',
+ '/usr/lib/jvm/default-java/include/linux',
+ ],
+ 'variables': {
+ 'gen_srcdir_parents': ['<(out_dir)'],
+ },
+ },
+ 'hard_dependency': 1,
+}