]> git.sesse.net Git - freerainbowtables/blob - Client Applications/rcracki_mt/Makefile
3be21210d842a4f0871cd9454b7b76fdaf77787a
[freerainbowtables] / Client Applications / rcracki_mt / Makefile
1 # rcracki_mt is a multithreaded implementation and fork of the original 
2 # RainbowCrack
3 #
4 # Copyright Martin Westergaard Jørgensen <martinwj2005@gmail.com>
5 # Copyright 2009, 2010 Daniël Niggebrugge <niggebrugge@fox-it.com>
6 # Copyright 2009, 2010 James Nobis <frt@quelrod.net>
7 #
8 # This file is part of rcracki_mt.
9 #
10 # rcracki_mt is free software: you can redistribute it and/or modify
11 # it under the terms of the GNU General Public License as published by
12 # the Free Software Foundation, either version 2 of the License, or
13 # (at your option) any later version.
14 #
15 # rcracki_mt is distributed in the hope that it will be useful,
16 # but WITHOUT ANY WARRANTY; without even the implied warranty of
17 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18 # GNU General Public License for more details.
19 #
20 # You should have received a copy of the GNU General Public License
21 # along with rcracki_mt.  If not, see <http://www.gnu.org/licenses/>.
22
23 SHELL = /bin/sh
24 BIN = $(DESTDIR)/usr/bin
25 CC = g++
26 OPTIMIZATION = -O3 -mtune=native
27 CFLAGS = -Wall -ansi $(OPTIMIZATION) -c $(DEBUG)
28 LFLAGS = -Wall -ansi -filt $(OPTIMIZATION) $(DEBUG)
29 LIBS = -lcrypto -lpthread
30 OBJS = BaseRTReader.o ChainWalkContext.o ChainWalkSet.o CrackEngine.o fast_md5.o HashAlgorithm.o HashRoutine.o HashSet.o lm2ntlm.o md4.o MemoryPool.o Public.o RainbowCrack.o rcrackiThread.o RTI2Reader.o
31 #sha1.o
32 WARNALL = -Wextra -Wunused-macros -Wunsafe-loop-optimizations -Wundef -Woverlength-strings -Wdisabled-optimization -Wformat-extra-args -Wformat-security -Winline
33
34 OSNAME = $(shell uname -s)
35 # apparently --string-debug works on Linux, OpenBSD, NetBSD, and FreeBSD
36 # but not on OSX so to the short name -S
37 STRIP = $(shell which strip) -S
38
39 #LIBS_Darwin = -lcrypto
40 LIBS_NetBSD = -ldes
41 #LIBS_OpenBSD = -lcrypto
42
43 LIBS += ${LIBS_$(OSNAME)}
44
45 all: rcracki_mt strip
46
47 rcracki_mt: $(OBJS)
48         $(CC) $(LFLAGS) $(OBJS) $(LIBS) -o rcracki_mt
49
50 clean:
51         rm -f *.o *.gcno *.gcda *.gcov rcracki_mt
52
53 debug: DEBUG += -DDEBUG -g
54 debug: rcracki_mt
55
56 debugall: DEBUG += -DDEBUG -g $(WARNALL)
57 debugall: rcracki_mt
58
59 dumpasmall: DEBUG += -S -fverbose-asm
60 dumpasmall: rcracki_mt
61
62 dumpasmprofileuseall: DEBUG += -S -fverbose-asm
63 dumpasmprofileuseall: profileuseall
64
65 debugprofileuseall: DEBUG += -fprofile-use
66 debugprofileuseall: debugall
67
68 m32: DEBUG += -m32
69 m32: rcracki_mt
70
71 m32debug: DEBUG += -m32
72 m32debug: debug
73
74 m32debugall: DEBUG += -m32
75 m32debugall: debugll
76
77 m32dumpasmall: DEBUG += -m32
78 m32dumpasmall: dumpasmall
79
80 m32dumpasmprofileuseall: DEBUG += -S -fverbose-asm -m32
81 m32dumpasmprofileuseall: profileuseall
82
83 m32profilegenall: DEBUG += -m32
84 m32profilegenall: profilegenall
85
86 m32profileuseall: DEBUG += -m32
87 m32profileuseall: profileuseall
88
89 profilegenall: DEBUG += -fprofile-generate $(WARNALL)
90 profilegenall: rcracki_mt
91
92 profileuseall: DEBUG += -fprofile-use $(WARNALL)
93 profileuseall: rcracki_mt
94
95 gcovall: DEBUG += -DDEBUG -g -fprofile-arcs -ftest-coverage
96 gcovall: rcracki_mt
97
98 gprofall: DEBUG += -DDEBUG -g -pg
99 gprofall: rcracki_mt
100
101 install:
102         install -d $(BIN)
103         install --group=root --owner=root --mode=755 rcracki_mt $(BIN)
104
105 rebuild: clean all
106
107 strip:
108         $(STRIP) rcracki_mt
109
110 uninstall:
111         rm -f $(BIN)/rcracki_mt
112
113 BaseRTReader.o: BaseRTReader.h BaseRTReader.cpp
114          $(CC) $(CFLAGS) BaseRTReader.cpp
115
116 ChainWalkContext.o: ChainWalkContext.h ChainWalkContext.cpp HashRoutine.h Public.h
117          $(CC) $(CFLAGS) ChainWalkContext.cpp
118
119 ChainWalkSet.o: Public.h ChainWalkSet.h ChainWalkSet.cpp
120          $(CC) $(CFLAGS) ChainWalkSet.cpp
121
122 CrackEngine.o: CrackEngine.h CrackEngine.cpp Public.h HashSet.h ChainWalkContext.h MemoryPool.h ChainWalkSet.h rcrackiThread.h RTI2Reader.h
123          $(CC) $(CFLAGS) CrackEngine.cpp
124
125 fast_md5.o: fast_md5.h fast_md5.cpp global.h
126          $(CC) $(CFLAGS) fast_md5.cpp
127
128 #HashAlgorithm.o: HashAlgorithm.h HashAlgorithm.cpp Public.h fast_md5.h md4.h sha1.h
129 HashAlgorithm.o: HashAlgorithm.h HashAlgorithm.cpp Public.h fast_md5.h md4.h
130          $(CC) $(CFLAGS) HashAlgorithm.cpp
131
132 HashRoutine.o: HashRoutine.h HashRoutine.cpp global.h HashAlgorithm.h
133          $(CC) $(CFLAGS) HashRoutine.cpp
134
135 HashSet.o: HashSet.h HashSet.cpp Public.h
136          $(CC) $(CFLAGS) HashSet.cpp
137
138 lm2ntlm.o: lm2ntlm.h lm2ntlm.cpp Public.h md4.h
139          $(CC) $(CFLAGS) lm2ntlm.cpp
140
141 md4.o: md4.h md4.cpp global.h
142          $(CC) $(CFLAGS) md4.cpp
143
144 MemoryPool.o: MemoryPool.h MemoryPool.cpp Public.h global.h
145          $(CC) $(CFLAGS) MemoryPool.cpp
146
147 Public.o: Public.h Public.cpp global.h
148          $(CC) $(CFLAGS) Public.cpp
149
150 RainbowCrack.o: RainbowCrack.cpp CrackEngine.h lm2ntlm.h
151          $(CC) $(CFLAGS) RainbowCrack.cpp
152
153 rcrackiThread.o: rcrackiThread.h rcrackiThread.cpp ChainWalkContext.h Public.h HashSet.h
154          $(CC) $(CFLAGS) rcrackiThread.cpp
155
156 RTI2Reader.o: RTI2Reader.h RTI2Reader.cpp BaseRTReader.h
157         $(CC) $(CFLAGS) RTI2Reader.cpp
158
159 #sha1.o: sha1.h sha1.cpp global.h
160 #        $(CC) $(CFLAGS) sha1.cpp