Add simple makefile for examples.
authorMilan Broz <gmazyland@gmail.com>
Sun, 9 Oct 2011 20:58:01 +0000 (20:58 +0000)
committerMilan Broz <gmazyland@gmail.com>
Sun, 9 Oct 2011 20:58:01 +0000 (20:58 +0000)
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@630 36d66b0a-2a48-0410-832c-cd162a569da5

docs/examples/Makefile [new file with mode: 0644]
docs/examples/crypt_log_usage.c
docs/examples/crypt_luks_usage.c

diff --git a/docs/examples/Makefile b/docs/examples/Makefile
new file mode 100644 (file)
index 0000000..e6e37be
--- /dev/null
@@ -0,0 +1,18 @@
+# LD_LIBRARY_PATH=../../lib/.libs
+TARGETS=crypt_log_usage crypt_luks_usage
+CFLAGS=-O0 -g -Wall -D_GNU_SOURCE -L../../lib/.libs -I../../lib
+LDLIBS=-lcryptsetup
+CC=gcc
+
+all: $(TARGETS)
+
+crypt_log_usage: crypt_log_usage.o
+       $(CC) -o $@ $^ $(LDLIBS)
+
+crypt_luks_usage: crypt_luks_usage.o
+       $(CC) -o $@ $^ $(LDLIBS)
+
+clean:
+       rm -f *.o *~ core $(TARGETS)
+
+.PHONY: clean
index 234f8f8..778b0cb 100644 (file)
@@ -1,8 +1,8 @@
-#include <libcryptsetup.h>
-#include <syslog.h>
 #include <stdio.h>
 #include <sys/types.h>
+#include <syslog.h>
 #include <unistd.h>
+#include <libcryptsetup.h>
 
 #include "crypt_examples.h"
 
index 53e75e4..08f691a 100644 (file)
@@ -1,10 +1,10 @@
-#include <inttypes.h>
-#include <libcryptsetup.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-#include <sys/types.h>
 #include <unistd.h>
+#include <inttypes.h>
+#include <sys/types.h>
+#include <libcryptsetup.h>
 
 #include "crypt_examples.h"