]> git.sesse.net Git - freerainbowtables/commitdiff
converti2 Makefile cleanup
authorJames Nobis <quel@quelrod.net>
Sun, 7 Nov 2010 21:55:10 +0000 (15:55 -0600)
committerJames Nobis <quel@quelrod.net>
Sun, 7 Nov 2010 21:55:10 +0000 (15:55 -0600)
converti2 mingw32 cleanup for binary cross-compilation

Client Applications/converti2/Makefile
Client Applications/converti2/converti2.cpp [changed mode: 0755->0644]

index 4886c1a12d5011194f4dd31f9265eb51d1a34189..7678a2b342b28dcf05d3089ce67c27c0700d07db 100644 (file)
@@ -21,10 +21,17 @@ debug: DEBUG += -DDEBUG -g
 debug: all
 
 #m32: DEBUG += -m32
-#m32: converti2
+#m32: all
 
 rebuild: clean all
 
+static: DEBUG += -static -static-libgcc
+static: all
+
+win32: CC=i586-mingw32msvc-g++
+win32: LIBS += -L/usr/lib/gcc/i586-mingw32msvc/4.2.1-sjlj/lib
+win32: all
+
 MemoryPool.o: $(COMMON_API_PATH)/MemoryPool.h $(COMMON_API_PATH)/MemoryPool.cpp $(COMMON_API_PATH)/Public.h
        $(CC) $(CFLAGS) $(COMMON_API_PATH)/MemoryPool.cpp
 
old mode 100755 (executable)
new mode 100644 (file)
index da728c3..13b492e
@@ -100,7 +100,7 @@ int GetMaxBits(uint64 highvalue)
                return 30;
        if(highvalue < 0x80000000)
                return 31;
-#ifdef WIN32
+#if defined(_WIN32) && !defined(__GNUC__)
        if(highvalue < 0x0000000100000000I64)
                return 32;
        if(highvalue < 0x0000000200000000I64)
@@ -297,7 +297,7 @@ void ConvertRainbowTable(string sPathName, string sResultFileName, unsigned int
        }
        unsigned int distribution[64] = {0};
        unsigned int numProcessedChains = 0;
-       FILE* fileR;
+       FILE* fileR = NULL;
        BaseRTReader *reader = NULL;
        if(sPathName.substr(sPathName.length() - 2, sPathName.length()) == "rt")
                reader = (BaseRTReader*)new RTReader(sPathName);
@@ -579,7 +579,7 @@ int main(int argc, char* argv[])
                }               
        }
        vector<string> vPathName;
-#ifdef WIN32
+#ifdef _WIN32
        string sWildCharPathName = argv[1];
        GetTableList(sWildCharPathName, vPathName);
 #else