summaryrefslogtreecommitdiffstats
path: root/llvm/projects/sample/lib
diff options
context:
space:
mode:
authorJohn Criswell <criswell@uiuc.edu>2003-06-30 22:13:48 +0000
committerJohn Criswell <criswell@uiuc.edu>2003-06-30 22:13:48 +0000
commite17afeb1b4c3de92e0352e69fae644b03f189e4b (patch)
tree58fa1dc45989a86843a3e0072a8d886252f1499b /llvm/projects/sample/lib
parent568d13cf934ecc6bb002ab791e20f284c5025475 (diff)
downloadbcm5719-llvm-e17afeb1b4c3de92e0352e69fae644b03f189e4b.tar.gz
bcm5719-llvm-e17afeb1b4c3de92e0352e69fae644b03f189e4b.zip
Adding in sample project tree.
llvm-svn: 7018
Diffstat (limited to 'llvm/projects/sample/lib')
-rw-r--r--llvm/projects/sample/lib/Makefile11
-rw-r--r--llvm/projects/sample/lib/sample/Makefile16
-rw-r--r--llvm/projects/sample/lib/sample/sample.c24
3 files changed, 51 insertions, 0 deletions
diff --git a/llvm/projects/sample/lib/Makefile b/llvm/projects/sample/lib/Makefile
new file mode 100644
index 00000000000..4b971053d01
--- /dev/null
+++ b/llvm/projects/sample/lib/Makefile
@@ -0,0 +1,11 @@
+#
+# 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/llvm/projects/sample/lib/sample/Makefile b/llvm/projects/sample/lib/sample/Makefile
new file mode 100644
index 00000000000..5569afbdda7
--- /dev/null
+++ b/llvm/projects/sample/lib/sample/Makefile
@@ -0,0 +1,16 @@
+#
+# Indicate where we are relative to the top of the source tree.
+#
+LEVEL=../..
+
+#
+# Give the name of a library. This will build a dynamic version.
+#
+SHARED_LIBRARY=1
+LIBRARYNAME=sample
+
+#
+# Include Makefile.common so we know what to do.
+#
+include $(LEVEL)/Makefile.common
+
diff --git a/llvm/projects/sample/lib/sample/sample.c b/llvm/projects/sample/lib/sample/sample.c
new file mode 100644
index 00000000000..bd78ed57465
--- /dev/null
+++ b/llvm/projects/sample/lib/sample/sample.c
@@ -0,0 +1,24 @@
+/*
+ * File: sample.c
+ *
+ * Description:
+ * This is a sample source file for a library. It helps to demonstrate
+ * how to setup a project that uses the LLVM build system, header files,
+ * and libraries.
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+
+// LLVM Header File
+#include "Support/DataTypes.h"
+
+// Header file global to this project
+#include "sample.h"
+
+int
+compute_sample (int a)
+{
+ return a;
+}
+
OpenPOWER on IntegriCloud