Adding Makefile to tegrastats build subdirectory targets.

BUG=chrome-os-partner:1815
TEST=emerged in tegra2 based chroot, appropriate build artifacts produced

Change-Id: I57f6ead0bb4d342cd6b4bf4182a37dd33c1e02f3
Reviewed-on: http://gerrit.chromium.org/gerrit/728
Reviewed-by: Chris Masone <cmasone@chromium.org>
Tested-by: Micah Catlin <micahc@chromium.org>
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..4dd9da4
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,19 @@
+# Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+SUBDIRS=tegrastats dfs_stress
+all:
+	for d in $(SUBDIRS); do \
+		$(MAKE) DEBUG=1 -C $$d; \
+	done
+
+install:
+	for d in $(SUBDIRS); do \
+		$(MAKE) -C $$d install; \
+	done
+
+clean:
+	for d in $(SUBDIRS); do \
+		$(MAKE)-C $$d clean; \
+	done
diff --git a/dfs_stress/Makefile b/dfs_stress/Makefile
index a953208..fea7f05 100644
--- a/dfs_stress/Makefile
+++ b/dfs_stress/Makefile
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.
 
-CFLAGS 	= -DNV_IS_LDK=1
+CFLAGS 	+= -DNV_IS_LDK=1
 TARGET	= dfs_stress
 SRC	= main.c
 
diff --git a/tegrastats/Makefile b/tegrastats/Makefile
index 1591262..39e952e 100644
--- a/tegrastats/Makefile
+++ b/tegrastats/Makefile
@@ -2,7 +2,7 @@
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.
 
-CFLAGS 	= -DNV_IS_LDK=1
+CFLAGS 	+= -DNV_IS_LDK=1
 TARGET	= tegrastats
 SRC	= main.c