forked from bighil/aeslua
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
38 lines (30 loc) · 927 Bytes
/
Makefile
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
34
35
36
37
38
DIST=aeslua-0.2.1
LIBDIR=/usr/local/lib/lua/5.1
SUBMODULES=aes buffer ciphermode gf util
FILES= Copyright.txt \
Changelog \
License.txt \
Makefile \
README \
README.html
.PHONY: dist install uninstall test speed
dist:
mkdir -p $(DIST)
cp -rf src $(DIST)
cp -rf lib $(DIST)
cp -f $(FILES) $(DIST)
find . -name .svn -print0 | xargs -0 rm -rf
tar cvzf $(DIST).tar.gz $(DIST)
zip -9 -r $(DIST).zip $(DIST)
install:
mkdir -p $(LIBDIR)
cp -p src/aeslua.lua $(LIBDIR)
mkdir -p $(LIBDIR)/aeslua
for i in $(SUBMODULES); do cp -p src/aeslua/$$i.lua $(LIBDIR)/aeslua; done
uninstall:
rm -rf $(LIBDIR)/aeslua $(LIBDIR)/aeslua.lua
test:
echo "print(aeslua.decrypt('key', aeslua.encrypt('key', 'hello world')))" | LUA_PATH="src/?.lua" lua5.1 -laeslua -lbit
LUA_PATH="src/?.lua" lua5.1 -laeslua -lbit src/test/testaes.lua
speed:
LUA_PATH="src/?.lua" lua5.1 -laeslua -lbit src/test/aesspeed.lua