diff options
author | Eelco Dolstra <e.dolstra@tudelft.nl> | 2005-05-02T15·25+0000 |
---|---|---|
committer | Eelco Dolstra <e.dolstra@tudelft.nl> | 2005-05-02T15·25+0000 |
commit | 36fb29f8f0317144a0074d7b6689912a4dc40325 (patch) | |
tree | 026fb03a97ca8b40a04ab38fa29759dbb0a9081e /make/examples/trivial | |
parent | 02f2da01426b338c75051397dcbdcb0c75913670 (diff) |
* Merge remaining stuff from the nix-make branch.
* Add support for the creation of shared libraries to `compileC', `link', and `makeLibrary'. * Enable the ATerm library to be made into a shared library.
Diffstat (limited to 'make/examples/trivial')
-rw-r--r-- | make/examples/trivial/default.nix | 8 | ||||
-rw-r--r-- | make/examples/trivial/hello.c | 7 |
2 files changed, 15 insertions, 0 deletions
diff --git a/make/examples/trivial/default.nix b/make/examples/trivial/default.nix new file mode 100644 index 000000000000..132245e5823f --- /dev/null +++ b/make/examples/trivial/default.nix @@ -0,0 +1,8 @@ +let { + + inherit (import ../../lib) compileC link; + + hello = link {objects = compileC {main = ./hello.c;};}; + + body = [hello]; +} diff --git a/make/examples/trivial/hello.c b/make/examples/trivial/hello.c new file mode 100644 index 000000000000..237ad8ffe76f --- /dev/null +++ b/make/examples/trivial/hello.c @@ -0,0 +1,7 @@ +#include <stdio.h> + +int main(int argc, char * * argv) +{ + printf("Hello World\n"); + return 0; +} |