git subrepo clone https://github.com/agottem/weld.git weld

subrepo:
  subdir:   "weld"
  merged:   "d0cd07b"
upstream:
  origin:   "https://github.com/agottem/weld.git"
  branch:   "master"
  commit:   "d0cd07b"
git-subrepo:
  version:  "0.3.1"
  origin:   "???"
  commit:   "???"

Change-Id: I109553651e97fd93e00aa555d171ca9d04ce8585
diff --git a/weld/toolchain/gcc/platform/unix.mk b/weld/toolchain/gcc/platform/unix.mk
new file mode 100644
index 0000000..387529a
--- /dev/null
+++ b/weld/toolchain/gcc/platform/unix.mk
@@ -0,0 +1,22 @@
+# Copyright 2015 Andrew Gottemoller.
+#
+# This software is a copyrighted work licensed under the terms of the
+# Weld license.  Please consult the file "WELD_LICENSE" for
+# details.
+
+# This makefile defines settings for the unix platform (linux, bsd, etc)
+
+
+ifeq ($(type), bin)
+    compile_goal      := $(patsubst $(output_path)/%,%,$(bin_output_path))/$(name)
+    compile_goal_path := $(output_path)
+else
+    compile_goal      := lib$(name).a
+    compile_goal_path := $(lib_output_path)
+endif
+
+ifeq ($(unix_flavor), bsd)
+    definition_list := _BSD_SOURCE $(definition_list)
+else ifeq ($(unix_flavor), linux)
+    definition_list := _DEFAULT_SOURCE $(definition_list)
+endif
diff --git a/weld/toolchain/gcc/platform/win32.mk b/weld/toolchain/gcc/platform/win32.mk
new file mode 100644
index 0000000..06a12e3
--- /dev/null
+++ b/weld/toolchain/gcc/platform/win32.mk
@@ -0,0 +1,26 @@
+# Copyright 2015 Andrew Gottemoller.
+#
+# This software is a copyrighted work licensed under the terms of the
+# Weld license.  Please consult the file "WELD_LICENSE" for
+# details.
+
+# This makefile defines settings for the windows platform
+
+
+ifeq ($(type), bin)
+    compile_goal      := $(patsubst $(output_path)/%,%,$(bin_output_path))/$(name).exe
+    compile_goal_path := $(output_path)
+
+    link_flag_list := -mwindows $(link_flag_list)
+else
+    compile_goal      := lib$(name).a
+    compile_goal_path := $(lib_output_path)
+endif
+
+definition_list := WIN32                 \
+                   UNICODE               \
+                   WINVER=0x0400         \
+                   _WIN32_WINNT=0x0400   \
+                   _WIN32_WINDOWS=0x0400 \
+                   _WIN32_IE=0x0500      \
+                   $(definition_list)