-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
70 lines (58 loc) · 1.75 KB
/
Makefile
File metadata and controls
70 lines (58 loc) · 1.75 KB
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# Makefile for IPCrypt Lua Implementation
LUA ?= lua
PREFIX ?= /usr/local
LIBDIR = $(PREFIX)/lib/lua/5.4
BINDIR = $(PREFIX)/bin
.PHONY: all test install uninstall clean help
all: help
help:
@echo "IPCrypt Lua Implementation"
@echo "=========================="
@echo ""
@echo "Available targets:"
@echo " test - Run all tests"
@echo " test-quick - Run quick test suite"
@echo " test-random - Test random number generation"
@echo " example - Run example code"
@echo " keygen - Generate a secure key"
@echo " install - Install library and tools"
@echo " uninstall - Remove installed files"
@echo " clean - Clean temporary files"
@echo ""
@echo "Usage examples:"
@echo " make test"
@echo " make install PREFIX=/usr/local"
test:
@echo "Running test suite..."
@cd tests && $(LUA) test_vectors.lua
@cd tests && $(LUA) test_random.lua
test-quick:
@echo "Running quick tests..."
@cd tests && $(LUA) test_vectors.lua
test-random:
@echo "Testing random generation..."
@cd tests && $(LUA) test_random.lua
example:
@echo "Running examples..."
@cd tests && $(LUA) example.lua
keygen:
@./bin/ipcrypt-keygen
install:
@echo "Installing IPCrypt Lua library..."
@mkdir -p $(LIBDIR)/ipcrypt/cipher
@mkdir -p $(LIBDIR)/ipcrypt/mode
@mkdir -p $(BINDIR)
@cp -r lib/ipcrypt/* $(LIBDIR)/ipcrypt/
@cp bin/ipcrypt-keygen $(BINDIR)/
@chmod +x $(BINDIR)/ipcrypt-keygen
@echo "Installed to $(LIBDIR)/ipcrypt"
@echo "Keygen tool installed to $(BINDIR)/ipcrypt-keygen"
uninstall:
@echo "Uninstalling IPCrypt Lua library..."
@rm -rf $(LIBDIR)/ipcrypt
@rm -f $(BINDIR)/ipcrypt-keygen
@echo "Uninstalled from $(LIBDIR) and $(BINDIR)"
clean:
@find . -name "*.luac" -delete
@find . -name "*~" -delete
@echo "Cleaned temporary files"