-
Notifications
You must be signed in to change notification settings - Fork 380
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #34 from jtesta/Windows-Port
Windows Port (credit jtesta)
- Loading branch information
Showing
7 changed files
with
277 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,10 @@ | ||
# object files | ||
*.o | ||
*.obj | ||
|
||
# compiled binary | ||
sslscan | ||
sslscan.exe | ||
|
||
# debian build of openssl | ||
openssl-*/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# If we're in Linux, lets see if we can find the path to Mingw automatically... | ||
ifeq ($(shell uname), Linux) | ||
MINGW32=$(shell which i586-mingw32msvc-gcc) | ||
ifneq ($(MINGW32),) | ||
CC=$(MINGW32) | ||
endif | ||
|
||
MINGW64=$(shell which x86_64-w64-mingw32-gcc) | ||
ifneq ($(MINGW64),) | ||
CC=$(MINGW64) | ||
endif | ||
endif | ||
|
||
ifndef CC | ||
CC=gcc | ||
endif | ||
|
||
.PHONY: clean | ||
|
||
# Enable security options like stack protectors and variable formatting checks. | ||
SECURITY_OPTIONS=-fstack-protector-all -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security | ||
|
||
# Turn on linker optimizations, and DEP support (--nxcompat) | ||
LINK_OPTIONS=-Wl,-O1 -Wl,--discard-all -Wl,--no-undefined -Wl,--dynamicbase -Wl,--nxcompat -static | ||
|
||
# Set ARCHITECTURE to either x86 or x86_64... | ||
ARCHITECTURE=32-bit | ||
ifeq ($(shell $(CC) -dumpmachine), x86_64-w64-mingw32) | ||
ARCHITECTURE=64-bit | ||
endif | ||
|
||
# Set the version string for the program. | ||
VERSION = "$(shell grep -E -o -m 1 "[0-9]+\.[0-9]+\.[0-9]+" Changelog) Windows $(ARCHITECTURE) (Mingw)" | ||
|
||
|
||
all: sslscan | ||
|
||
sslscan: sslscan.c | ||
$(CC) -I$(OPENSSL_PATH)/include -DVERSION=\"$(VERSION)\" $(DEFINES) $(SECURITY_OPTIONS) $(LINK_OPTIONS) -o sslscan.exe sslscan.c $(OPENSSL_PATH)/libssl.a $(OPENSSL_PATH)/libcrypto.a -lws2_32 -lgdi32 | ||
strip sslscan.exe | ||
|
||
clean: | ||
rm -f *.o sslscan.exe |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
LFLAGS=/nologo /dynamicbase /highentropyva /nxcompat /opt:ref /subsystem:console /ltcg | ||
CFLAGS=/nologo /GL /GS /Gs0 /Gw /MT /Ox -DVERSION="\"1.9.8 Windows 64-bit (VS)\"" | ||
|
||
all: sslscan.exe | ||
|
||
sslscan.obj: sslscan.c | ||
cl.exe $(CFLAGS) /I $(OPENSSL_PATH)/include /c sslscan.c | ||
|
||
sslscan.exe: sslscan.obj | ||
link.exe $(LFLAGS) /out:sslscan.exe sslscan.obj $(OPENSSL_PATH)/out32/libeay32.lib $(OPENSSL_PATH)/out32/ssleay32.lib advapi32.lib gdi32.lib user32.lib ws2_32.lib | ||
|
||
clean: | ||
del sslscan.obj sslscan.exe | ||
|
||
rebuild: clean all |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.