1 # rcracki_mt is a multithreaded implementation and fork of the original
4 # Copyright Martin Westergaard Jørgensen <martinwj2005@gmail.com>
5 # Copyright 2009, 2010 Daniël Niggebrugge <niggebrugge@fox-it.com>
6 # Copyright 2009, 2010, 2011 James Nobis <frt@quelrod.net>
8 # This file is part of rcracki_mt.
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.
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.
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/>.
24 BIN = $(DESTDIR)/usr/bin
26 # -mtune=native doesn't work on NetBSD 5.1 with gcc 4.1.3 and make (fine with gmake)
27 OPTIMIZATION = -O3 -mtune=native
28 CFLAGS = -Wall -ansi $(OPTIMIZATION) -c $(DEBUG)
29 LFLAGS = -Wall -ansi -filt $(OPTIMIZATION) $(DEBUG)
30 LIBS = -lcrypto -lpthread
31 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
33 WARNALL = -Wextra -Wunused-macros -Wunsafe-loop-optimizations -Wundef -Woverlength-strings -Wdisabled-optimization -Wformat-extra-args -Wformat-security -Winline
35 OSNAME = $(shell uname -s)
36 # apparently --string-debug works on Linux, OpenBSD, NetBSD, and FreeBSD
37 # but not on OSX so to the short name -S
38 STRIP = $(shell which strip) -S
40 #LIBS_Darwin = -lcrypto
42 #LIBS_OpenBSD = -lcrypto
44 LIBS += ${LIBS_$(OSNAME)}
49 $(CC) $(LFLAGS) $(OBJS) $(LIBS) -o rcracki_mt
52 rm -f *.o *.gcno *.gcda *.gcov rcracki_mt
54 debug: DEBUG += -DDEBUG -g
57 debugall: DEBUG += -DDEBUG -g $(WARNALL)
60 dumpasmall: DEBUG += -S -fverbose-asm
61 dumpasmall: rcracki_mt
63 dumpasmprofileuseall: DEBUG += -S -fverbose-asm
64 dumpasmprofileuseall: profileuseall
66 debugprofileuseall: DEBUG += -fprofile-use
67 debugprofileuseall: debugall
72 m32debug: DEBUG += -m32
75 m32debugall: DEBUG += -m32
78 m32dumpasmall: DEBUG += -m32
79 m32dumpasmall: dumpasmall
81 m32dumpasmprofileuseall: DEBUG += -S -fverbose-asm -m32
82 m32dumpasmprofileuseall: profileuseall
84 m32profilegenall: DEBUG += -m32
85 m32profilegenall: profilegenall
87 m32profileuseall: DEBUG += -m32
88 m32profileuseall: profileuseall
90 profilegenall: DEBUG += -fprofile-generate $(WARNALL)
91 profilegenall: rcracki_mt
93 profileuseall: DEBUG += -fprofile-use $(WARNALL)
94 profileuseall: rcracki_mt
96 gcovall: DEBUG += -DDEBUG -g -fprofile-arcs -ftest-coverage
99 gprofall: DEBUG += -DDEBUG -g -pg
104 install --group=root --owner=root --mode=755 rcracki_mt $(BIN)
112 rm -f $(BIN)/rcracki_mt
114 BaseRTReader.o: BaseRTReader.h BaseRTReader.cpp
115 $(CC) $(CFLAGS) BaseRTReader.cpp
117 ChainWalkContext.o: ChainWalkContext.h ChainWalkContext.cpp HashRoutine.h Public.h
118 $(CC) $(CFLAGS) ChainWalkContext.cpp
120 ChainWalkSet.o: Public.h ChainWalkSet.h ChainWalkSet.cpp
121 $(CC) $(CFLAGS) ChainWalkSet.cpp
123 CrackEngine.o: CrackEngine.h CrackEngine.cpp Public.h HashSet.h ChainWalkContext.h MemoryPool.h ChainWalkSet.h rcrackiThread.h RTI2Reader.h
124 $(CC) $(CFLAGS) CrackEngine.cpp
126 fast_md5.o: fast_md5.h fast_md5.cpp global.h
127 $(CC) $(CFLAGS) fast_md5.cpp
129 #HashAlgorithm.o: HashAlgorithm.h HashAlgorithm.cpp Public.h fast_md5.h md4.h sha1.h
130 HashAlgorithm.o: HashAlgorithm.h HashAlgorithm.cpp Public.h fast_md5.h md4.h
131 $(CC) $(CFLAGS) HashAlgorithm.cpp
133 HashRoutine.o: HashRoutine.h HashRoutine.cpp global.h HashAlgorithm.h
134 $(CC) $(CFLAGS) HashRoutine.cpp
136 HashSet.o: HashSet.h HashSet.cpp Public.h
137 $(CC) $(CFLAGS) HashSet.cpp
139 lm2ntlm.o: lm2ntlm.h lm2ntlm.cpp Public.h md4.h
140 $(CC) $(CFLAGS) lm2ntlm.cpp
142 md4.o: md4.h md4.cpp global.h
143 $(CC) $(CFLAGS) md4.cpp
145 MemoryPool.o: MemoryPool.h MemoryPool.cpp Public.h global.h
146 $(CC) $(CFLAGS) MemoryPool.cpp
148 Public.o: Public.h Public.cpp global.h
149 $(CC) $(CFLAGS) Public.cpp
151 RainbowCrack.o: RainbowCrack.cpp CrackEngine.h lm2ntlm.h
152 $(CC) $(CFLAGS) RainbowCrack.cpp
154 rcrackiThread.o: rcrackiThread.h rcrackiThread.cpp ChainWalkContext.h Public.h HashSet.h
155 $(CC) $(CFLAGS) rcrackiThread.cpp
157 RTI2Reader.o: RTI2Reader.h RTI2Reader.cpp BaseRTReader.h
158 $(CC) $(CFLAGS) RTI2Reader.cpp
160 #sha1.o: sha1.h sha1.cpp global.h
161 # $(CC) $(CFLAGS) sha1.cpp