summaryrefslogtreecommitdiff
path: root/projects/sample/tools
diff options
context:
space:
mode:
authorEd Schouten <ed@FreeBSD.org>2009-06-02 17:52:33 +0000
committerEd Schouten <ed@FreeBSD.org>2009-06-02 17:52:33 +0000
commit009b1c42aa6266385f2c37e227516b24077e6dd7 (patch)
tree64ba909838c23261cace781ece27d106134ea451 /projects/sample/tools
Diffstat (limited to 'projects/sample/tools')
-rw-r--r--projects/sample/tools/Makefile13
-rw-r--r--projects/sample/tools/sample/Makefile23
-rw-r--r--projects/sample/tools/sample/main.c14
3 files changed, 50 insertions, 0 deletions
diff --git a/projects/sample/tools/Makefile b/projects/sample/tools/Makefile
new file mode 100644
index 0000000000000..00ff52b42cfaf
--- /dev/null
+++ b/projects/sample/tools/Makefile
@@ -0,0 +1,13 @@
+##===- projects/sample/tools/Makefile ----------------------*- Makefile -*-===##
+
+#
+# Relative path to the top of the source tree.
+#
+LEVEL=..
+
+#
+# List all of the subdirectories that we will compile.
+#
+DIRS=sample
+
+include $(LEVEL)/Makefile.common
diff --git a/projects/sample/tools/sample/Makefile b/projects/sample/tools/sample/Makefile
new file mode 100644
index 0000000000000..324030c567269
--- /dev/null
+++ b/projects/sample/tools/sample/Makefile
@@ -0,0 +1,23 @@
+##===- projects/sample/tools/sample/Makefile ---------------*- Makefile -*-===##
+
+#
+# Indicate where we are relative to the top of the source tree.
+#
+LEVEL=../..
+
+#
+# Give the name of the tool.
+#
+TOOLNAME=Sample
+
+#
+# List libraries that we'll need
+# We use LIBS because sample is a dynamic library.
+#
+USEDLIBS = sample.a
+
+#
+# Include Makefile.common so we know what to do.
+#
+include $(LEVEL)/Makefile.common
+
diff --git a/projects/sample/tools/sample/main.c b/projects/sample/tools/sample/main.c
new file mode 100644
index 0000000000000..2880265f8450b
--- /dev/null
+++ b/projects/sample/tools/sample/main.c
@@ -0,0 +1,14 @@
+#include <stdio.h>
+#include <stdlib.h>
+
+#include <unistd.h>
+
+#include "sample.h"
+
+int
+main (int argc, char ** argv)
+{
+ printf ("%d\n", compute_sample (5));
+ exit (0);
+}
+