diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..25efd59e --- /dev/null +++ b/.gitignore @@ -0,0 +1,11 @@ +################################################################################ +# This .gitignore file was automatically created by Microsoft(R) Visual Studio. +################################################################################ + +*.o +/config +/.vs +/configure-stamp +/cntlm.exe +/cntlm-0.93beta5 +/cntlm-0.93beta5-win32.exe diff --git a/Makefile b/Makefile index 71894aa3..f94c5ce8 100644 --- a/Makefile +++ b/Makefile @@ -16,9 +16,15 @@ NAME := cntlm CC := gcc VER := $(shell cat VERSION) OS := $(shell uname -s) +CYGARCH := $(shell uname -a) OSLDFLAGS := $(shell [ $(OS) = "SunOS" ] && echo "-lrt -lsocket -lnsl") LDFLAGS := -lpthread $(OSLDFLAGS) -CYGWIN_REQS := cygwin1.dll cyggcc_s-1.dll cygstdc++-6.dll cygrunsrv.exe + +ifeq ($(findstring x86_64,$(CYGARCH)),) + CYGWIN_REQS := cygwin1.dll cyggcc_s-1.dll cygstdc++-6.dll cygrunsrv.exe +else + CYGWIN_REQS := cygwin1.dll cyggcc_s-seh-1.dll cygstdc++-6.dll cygrunsrv.exe +endif ifeq ($(DEBUG),1) CFLAGS += -g -std=c99 -Wall -pedantic -D__BSD_VISIBLE -D_ALL_SOURCE -D_XOPEN_SOURCE=600 -D_POSIX_C_SOURCE=200112 -D_ISOC99_SOURCE -D_REENTRANT -D_BSD_SOURCE -DVERSION=\"'$(VER)'\" @@ -33,6 +39,7 @@ else endif $(NAME): configure-stamp $(OBJS) + @echo $(CYGARCH) @echo "Linking $@" @$(CC) $(CFLAGS) -o $@ $(OBJS) $(LDFLAGS)