Add missing tools/defines.py file

Change-Id: I98f0863d60ec3d0333f1dc3b657924c415a86ef3
diff --git a/tools/defines.py b/tools/defines.py
new file mode 100644
index 0000000..6fdd24f
--- /dev/null
+++ b/tools/defines.py
@@ -0,0 +1,22 @@
+# Copyright (c) 2019, the R8 project authors. Please see the AUTHORS file
+# for details. All rights reserved. Use of this source code is governed by a
+# BSD-style license that can be found in the LICENSE file.
+
+import os
+import sys
+
+# Static defines for use in tools (and utils.py).
+# There must be no dependencies on other utils from this file!
+
+TOOLS_DIR = os.path.abspath(os.path.normpath(os.path.join(__file__, '..')))
+REPO_ROOT = os.path.realpath(os.path.join(TOOLS_DIR, '..'))
+THIRD_PARTY = os.path.join(REPO_ROOT, 'third_party')
+
+def IsWindows():
+  return sys.platform.startswith('win')
+
+def IsLinux():
+  return sys.platform.startswith('linux')
+
+def IsOsX():
+  return sys.platform.startswith('darwin')
\ No newline at end of file