diff options
| author | John Criswell <criswell@uiuc.edu> | 2003-06-30 22:13:48 +0000 |
|---|---|---|
| committer | John Criswell <criswell@uiuc.edu> | 2003-06-30 22:13:48 +0000 |
| commit | e17afeb1b4c3de92e0352e69fae644b03f189e4b (patch) | |
| tree | 58fa1dc45989a86843a3e0072a8d886252f1499b /llvm/projects/sample/lib | |
| parent | 568d13cf934ecc6bb002ab791e20f284c5025475 (diff) | |
| download | bcm5719-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/Makefile | 11 | ||||
| -rw-r--r-- | llvm/projects/sample/lib/sample/Makefile | 16 | ||||
| -rw-r--r-- | llvm/projects/sample/lib/sample/sample.c | 24 |
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; +} + |

