summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--main.c16
-rw-r--r--makefile11
2 files changed, 27 insertions, 0 deletions
diff --git a/main.c b/main.c
new file mode 100644
index 0000000..19483e6
--- /dev/null
+++ b/main.c
@@ -0,0 +1,16 @@
1#include <stdio.h>
2#include <stdlib.h>
3#include <uuid/uuid.h>
4
5int main(void)
6{
7 uuid_t uuid;
8 uuid_generate(uuid);
9
10 char out[37];
11 uuid_unparse(uuid, out);
12
13 printf("UUID: %s\n", out);
14 printf("sizeof(uuid) = %zu\n", sizeof uuid);
15 return 0;
16}
diff --git a/makefile b/makefile
new file mode 100644
index 0000000..e56f0ef
--- /dev/null
+++ b/makefile
@@ -0,0 +1,11 @@
1all: uuid-test
2
3uuid-test: main.o
4 cc -L/usr/local/lib -luuid -s -o $@ main.o
5
6main.o: main.c
7 cc -Wall -Werror -std=c99 -pedantic -I/usr/local/include -O2 -c main.c -o $@
8
9.PHONY: clean
10clean:
11 rm -f main.o uuid-test