summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore2
-rw-r--r--Makefile35
2 files changed, 37 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..392b79d
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,2 @@
+/*.o
+/*.a
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..6b66dcd
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,35 @@
+.POSIX:
+PREFIX = /usr
+NAME = tweetnacl
+LIBDIR = $(PREFIX)/lib
+INCLUDEDIR = $(PREFIX)/include
+SRCDIR = $(PREFIX)/src/$(NAME)
+
+
+all: lib$(NAME).a
+
+lib$(NAME).a: lib$(NAME).a($(NAME).o)
+
+$(NAME).o: $(NAME).h
+
+
+check:
+
+clean:
+ rm -f *.o *.a
+
+
+install: all
+ mkdir -p \
+ '$(DESTDIR)$(LIBDIR)' \
+ '$(DESTDIR)$(INCLUDEDIR)' \
+ '$(DESTDIR)$(SRCDIR)'
+ cp lib$(NAME).a '$(DESTDIR)$(LIBDIR)'
+ cp $(NAME).h '$(DESTDIR)$(INCLUDEDIR)'
+ cp $(NAME).h $(NAME).c '$(DESTDIR)$(SRCDIR)'
+
+uninstall:
+ rm -rf \
+ '$(DESTDIR)$(LIBDIR)'/lib$(NAME).a \
+ '$(DESTDIR)$(INCLUDEDIR)'/$(NAME).h \
+ '$(DESTDIR)$(SRCDIR)'