]> git.sesse.net Git - freerainbowtables/blob - Client Applications/rcracki_mt/Makefile
sync from rcracki.sourceforge.net svn
[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 racrcki_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
27 INCLUDES = -I../../Common/rt\ api
28 CFLAGS = -Wall -ansi $(OPTIMIZATION) -c $(DEBUG)
29 LFLAGS = -Wall -ansi $(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 sha1.o
32 COMMON_API_PATH = ../../Common/rt\ api
33
34 OSNAME = $(shell uname -s)
35 STRIP = $(shell which strip) --strip-debug
36
37 #LIBS_Darwin = -lcrypto
38 LIBS_NetBSD = -ldes
39 #LIBS_OpenBSD = -lcrypto
40
41 LIBS += ${LIBS_$(OSNAME)}
42
43 all: rcracki_mt strip
44
45 rcracki_mt: $(OBJS)
46         $(CC) $(LFLAGS) $(OBJS) $(LIBS) -o rcracki_mt
47
48 clean:
49         rm -f *.o *.gcno *.gcda *.gcov rcracki_mt
50
51 debug: DEBUG += -DDEBUG -g
52 debug: rcracki_mt
53
54 debugall: DEBUG += -DDEBUG -g -Wextra -Wunused-macros -Wunsafe-loop-optimizations -Wundef -Woverlength-strings -Wdisabled-optimization -Wformat-extra-args -Wformat-security -Winline
55 debugall: rcracki_mt
56
57 install:
58         install -d $(BIN)
59         install --group=root --owner=root --mode=755 rcracki_mt $(BIN)
60
61 rebuild: clean all
62
63 strip:
64         $(STRIP) rcracki_mt
65
66 uninstall:
67         rm -f $(BIN)/rcracki_mt
68
69 BaseRTReader.o: BaseRTReader.h BaseRTReader.cpp
70          $(CC) $(CFLAGS) BaseRTReader.cpp
71
72 ChainWalkContext.o: ChainWalkContext.h ChainWalkContext.cpp HashRoutine.h Public.h
73          $(CC) $(CFLAGS) ChainWalkContext.cpp
74
75 ChainWalkSet.o: Public.h ChainWalkSet.h ChainWalkSet.cpp
76          $(CC) $(CFLAGS) ChainWalkSet.cpp
77
78 CrackEngine.o: CrackEngine.h CrackEngine.cpp Public.h HashSet.h ChainWalkContext.h MemoryPool.h ChainWalkSet.h rcrackiThread.h RTI2Reader.h
79          $(CC) $(CFLAGS) CrackEngine.cpp
80
81 fast_md5.o: $(COMMON_API_PATH)/fast_md5.h $(COMMON_API_PATH)/fast_md5.cpp \
82         $(COMMON_API_PATH)/global.h
83          $(CC) $(CFLAGS) $(COMMON_API_PATH)/fast_md5.cpp
84
85 #HashAlgorithm.o: HashAlgorithm.h HashAlgorithm.cpp Public.h fast_md5.h md4.h sha1.h
86 HashAlgorithm.o: HashAlgorithm.h HashAlgorithm.cpp Public.h \
87         $(COMMON_API_PATH)/fast_md5.h md4.h
88          $(CC) $(CFLAGS) HashAlgorithm.cpp
89
90 HashRoutine.o: HashRoutine.h HashRoutine.cpp global.h HashAlgorithm.h
91          $(CC) $(CFLAGS) HashRoutine.cpp
92
93 HashSet.o: HashSet.h HashSet.cpp Public.h
94          $(CC) $(CFLAGS) HashSet.cpp
95
96 lm2ntlm.o: lm2ntlm.h lm2ntlm.cpp Public.h md4.h
97          $(CC) $(CFLAGS) lm2ntlm.cpp
98
99 md4.o: md4.h md4.cpp global.h
100          $(CC) $(CFLAGS) md4.cpp
101
102 MemoryPool.o: MemoryPool.h MemoryPool.cpp Public.h global.h
103          $(CC) $(CFLAGS) MemoryPool.cpp
104
105 Public.o: Public.h Public.cpp global.h
106          $(CC) $(CFLAGS) Public.cpp
107
108 RainbowCrack.o: RainbowCrack.cpp CrackEngine.h lm2ntlm.h
109          $(CC) $(CFLAGS) RainbowCrack.cpp
110
111 rcrackiThread.o: rcrackiThread.h rcrackiThread.cpp ChainWalkContext.h Public.h HashSet.h
112          $(CC) $(CFLAGS) rcrackiThread.cpp
113
114 RTI2Reader.o: RTI2Reader.h RTI2Reader.cpp BaseRTReader.h
115         $(CC) $(CFLAGS) RTI2Reader.cpp
116
117 sha1.o: sha1.h sha1.cpp global.h
118          $(CC) $(CFLAGS) sha1.cpp