Diff

Differences From Artifact [9e180a9dbc]:

To Artifact [d736d17e3f]:


1

2
3
4
5
6
7
8
9
10
11


12
13
14
15
16
17
18
19

20
21
22


23
24
25
26
27
28


29
30
31
32

1
2
3
4
5
6
7
8
9
10

11
12
13
14
15
16
17
18


19
20


21
22
23
24
25
26
27

28
29
30
31
32
33
-
+









-
+
+






-
-
+

-
-
+
+





-
+
+




all: tweetnacl.o
all: out/tweetnacl.c out/tweetnacl.h

tweetnacl.h.new: src/tweetnacl.h
	rm -f tweetnacl.h.new tweetnacl.h
	cp src/tweetnacl.h tweetnacl.h.new

tweetnacl.c.new: src/tweetnacl.c
	rm -f tweetnacl.c.new tweetnacl.c
	cp src/tweetnacl.c tweetnacl.c.new

tweetnacl.c: tweetnacl.c.new tweetnacl.h.new patches/tweetnacl-ed25519blake2b.diff patches/tweetnacl-derivepubkey.diff
out/tweetnacl.c: tweetnacl.c.new tweetnacl.h.new patches/tweetnacl-ed25519blake2b.diff patches/tweetnacl-derivepubkey.diff
	mkdir -p out
	rm -f tweetnacl.c tweetnacl.h
	patch -p1 < patches/tweetnacl-ed25519blake2b.diff || ( rm -f tweetnacl.c.new tweetnacl.h.new; exit 1 )
	patch -p1 < patches/tweetnacl-derivepubkey.diff || ( rm -f tweetnacl.c.new tweetnacl.h.new; exit 1 )
	rm -f tweetnacl.c.new.orig tweetnacl.h.new.orig
	mv tweetnacl.h.new tweetnacl.h
	mv tweetnacl.c.new tweetnacl.c

tweetnacl.h: tweetnacl.c
	mv tweetnacl.c out

tweetnacl.o: tweetnacl.c tweetnacl.h
	$(CC) $(CPPFLAGS) $(CFLAGS) -I../blake2b/ -o tweetnacl.o -c tweetnacl.c
out/tweetnacl.h: out/tweetnacl.c
	mv tweetnacl.h out

clean:
	rm -f tweetnacl.c.new.orig tweetnacl.h.new.orig
	rm -f tweetnacl.h.new tweetnacl.h
	rm -f tweetnacl.c.new tweetnacl.c
	rm -f tweetnacl.o
	rm -f out/tweetnacl.c out/tweetnacl.h
	-rmdir out

distclean: clean

.PHONY: all clean distclean