This repository has been archived by the owner on Dec 31, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 107
/
Copy pathMakefile
57 lines (39 loc) · 1.56 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
PLATFORM_OPTS =
PYTHON = /usr/include/python2.7
CXXFLAGS = -fPIC -Wno-sign-compare
# -g3 -O0
BOOST_INC = /usr/include
BOOST_LIB = /usr/lib
TARGET = pyserpent
COMMON_OBJS = keccak-tiny.o bignum.o util.o tokenize.o lllparser.o parser.o opcodes.o optimize.o functions.o rewriteutils.o preprocess.o rewriter.o compiler.o funcs.o
HEADERS = bignum.h util.h keccak-tiny-wrapper.h tokenize.h lllparser.h parser.h opcodes.h functions.h optimize.h rewriteutils.h preprocess.h rewriter.h compiler.h funcs.h
PYTHON_VERSION = 2.7
serpent : serpentc lib
lib: $(COMMON_OBJS)
ar rvs libserpent.a $(COMMON_OBJS)
g++ $(CXXFLAGS) -shared $(COMMON_OBJS) -o libserpent.so
serpentc: $(COMMON_OBJS) cmdline.o
rm -rf serpent
g++ -Wall $(COMMON_OBJS) cmdline.o -o serpent
keccak-tiny.o : keccak-tiny.cpp
bignum.o : bignum.cpp bignum.h
opcodes.o : opcodes.cpp opcodes.h
util.o : util.cpp util.h bignum.o
tokenize.o : tokenize.cpp tokenize.h util.o
lllparser.o : lllparser.cpp lllparser.h tokenize.o util.o
parser.o : parser.cpp parser.h tokenize.o util.o
rewriter.o : rewriter.cpp rewriter.h lllparser.o util.o rewriteutils.o preprocess.o opcodes.o functions.o
preprocessor.o: rewriteutils.o functions.o
compiler.o : compiler.cpp compiler.h util.o
funcs.o : funcs.cpp funcs.h
cmdline.o: cmdline.cpp
pyext.o: pyext.cpp
clean:
rm -f serpent *\.o libserpent.a libserpent.so
install:
cp serpent /usr/local/bin
cp libserpent.a /usr/local/lib
cp libserpent.so /usr/local/lib
rm -rf /usr/local/include/libserpent
mkdir -p /usr/local/include/libserpent
cp $(HEADERS) /usr/local/include/libserpent