forked from LuaDist/lbn
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
47 lines (35 loc) · 832 Bytes
/
Copy pathMakefile
File metadata and controls
47 lines (35 loc) · 832 Bytes
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
# makefile for bn library for Lua
# change these to reflect your Lua installation
LUA= /usr/local/openresty/luajit
LUAINC= $(LUA)/include/luajit-2.1
LUALIB= $(LUA)/lib
LUABIN= $(LUA)/bin
# probably no need to change anything below here
CC= gcc
CFLAGS= -fPIC $(INCS) $(WARN) -O2 $G
WARN= -ansi -pedantic -Wall
INCS= -I$(LUAINC)
MAKESO= $(CC) -fPIC -shared
#MAKESO= env MACOSX_DEPLOYMENT_TARGET=10.3 $(CC) -bundle -undefined dynamic_lookup
MYNAME= bn
MYLIB= l$(MYNAME)
T= $(MYNAME).so
OBJS= $(MYLIB).o
TEST= test.lua
all: test
test: $T
$(LUABIN)/luajit $(TEST)
o: $(MYLIB).o
so: $T
$T: $(OBJS)
$(MAKESO) -o $@ $(OBJS) -lcrypto
clean:
rm -f $(OBJS) $T core core.*
doc:
@echo "$(MYNAME) library:"
@fgrep '/**' $(MYLIB).c | cut -f2 -d/ | tr -d '*' | sort | column
diff: clean
wget -q -N $F
tar zxf $A
diff $D .
# eof