-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
59 lines (30 loc) · 1.12 KB
/
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# Makefile for Kademlua
#
# (C) 2010, Michael Meier
#
# builds only a standalone binary
# for shared librariers, see bottom
# edit those to point to your lua/openssl installation
LUA_INCLUDE=-I/opt/local/include
LUA_LIB=-L/opt/local/lib -llua
SSL_INCLUDE=-I/usr/include
SSL_LIB=-L/usr/lib -lcrypto
DEBUG=-g
OPT=-O0
CFLAGS=-Wall $(DEBUG) $(OPT) -std=c99 $(LUA_INCLUDE) $(SSL_INCLUDE)
LDFLAGS=$(LUA_LIB) $(SSL_LIB)
all: standalone #shared
shared:
@echo shared lib compiling not implemented yet
standalone: kademlua
kademlua: kademlua.o kademluamain.o
clean:
rm -f *.o
rm -f kademlua
rm -rf kademlua.dSYM
# shared libraries should be something like:
#$LIBTOOL --mode=compile gcc -Wall $DEBUG kademlua.c -I /opt/local/include -c -o kademlua.o -std=c99 -O3 || exit 1
#$LIBTOOL --mode=compile gcc -Wall $DEBUG kademluamain.c -I /opt/local/include -c -o kademluamain.o -std=c99 -O3 || exit 1
#$LIBTOOL --mode=link gcc -o libkademlua.la kademlua.lo -rpath $(pwd) -lcrypto
#$LIBTOOL --mode=link gcc -o kademlua kademlua.lo kademluamain.lo -lcrypto -L/opt/local/lib -llua
# where $LIBTOOL == glibtool or something like that