--- Makefile.orig 2015-06-21 12:05:51 UTC +++ Makefile @@ -112,7 +112,7 @@ ifeq ($(OS),Windows_NT) OS = Win32 endif -CFLAGS_COMMON = -MMD -W -Wall -Wcast-align -Wcast-qual -Wno-unused-parameter -fno-strict-aliasing +CFLAGS_COMMON = -MMD -W -Wall -Wcast-align -Wcast-qual -Wno-implicit-function-declaration -Wno-unused-parameter -fcommon CPPFLAGS_COMMON = LDFLAGS_COMMON = LIBS_COMMON = @@ -153,7 +153,7 @@ else ifeq ($(BUILD),release) -ifeq ($(findstring $(CFLAGS),-O),) +ifeq ($(findstring -O,$(CFLAGS)),) CFLAGS_COMMON += -O3 # only add -O3 if no -O flag is in $(CFLAGS) # to allow overriding the optimizations @@ -170,10 +170,10 @@ INSTALLDIR_BASE := $(INSTALLDIR) -ifeq ($(OS),Linux) +ifneq ($(filter $(OS),Linux FreeBSD),) CPPFLAGS_COMMON += -DPOSIX -DXWINDOWS CFLAGS_COMMON += -fPIC - LDFLAGS_DLL = -fPIC -ldl + LDFLAGS_DLL = -fPIC LIBS_COMMON = -lpthread EXE ?= $(shell uname -m) A = a @@ -291,15 +291,15 @@ checkbinary sed "$(SED)"; \ checkbinary findutils "$(FIND)"; \ checkbinary diff "$(DIFF)"; \ - checkbinary gcc "$(CC)"; \ - checkbinary g++ "$(CXX)"; \ + checkbinary c\ compiler "$(CC)"; \ + checkbinary c++\ compiler "$(CXX)"; \ checkbinary binutils "$(RANLIB)"; \ checkbinary binutils "$(AR)"; \ checkbinary pkg-config "$(PKGCONFIG)"; \ - checkbinary unzip "$(UNZIPPER)"; \ - checkbinary git-core "$(GIT)"; \ - checkbinary subversion "$(SVN)"; \ - checkbinary wget "$(WGET)"; \ +# checkbinary unzip "$(UNZIPPER)"; \ +# checkbinary git-core "$(GIT)"; \ +# checkbinary subversion "$(SVN)"; \ +# checkbinary wget "$(WGET)"; \ [ "$(OS)" = "Win32" ] && checkbinary mingw32 "$(WINDRES)"; \ [ -n "$(LDD)" ] && checkbinary libc6 "$(LDD)"; \ [ -n "$(OTOOL)" ] && checkbinary xcode "$(OTOOL)"; \ @@ -437,7 +437,7 @@ %.$(EXE): file=$@; $(MKDIR) $${file%/*} $(CXX) $^ $(LDFLAGS) $(LDFLAGS_COMMON) $(LDFLAGS_EXTRA) $(LIBS_EXTRA) $(LIBS_COMMON) $(LIBS) -o $@ - [ -z "$(LDD)" ] || [ -z "`$(LDD) -r $@ $(STDERR_TO_STDOUT) $(STDOUT_TO_DEVNULL) $(TEE_STDERR)`" ] || { $(RM) $@; exit 1; } + [ -z "$(LDD)" ] || [ -z "`$(LDD) $@ $(STDERR_TO_STDOUT) $(STDOUT_TO_DEVNULL) $(TEE_STDERR)`" ] || { $(RM) $@; exit 1; } %.$(A): $(AR) rc $@ $^ @@ -446,7 +446,7 @@ %.$(DLL): file=$@; $(MKDIR) $${file%/*} $(CXX) $^ $(LDFLAGS) $(LDFLAGS_COMMON) $(LDFLAGS_EXTRA) $(LDFLAGS_DLL) $(LIBS_EXTRA) $(LIBS_COMMON) $(LIBS) -shared -o $@ - [ -z "$(LDD)" ] || [ -z "`$(LDD) -r $@ $(STDERR_TO_STDOUT) $(STDOUT_TO_DEVNULL) $(TEE_STDERR)`" ] || { $(RM) $@; exit 1; } + [ -z "$(LDD)" ] || [ -z "`$(LDD) $@ $(STDERR_TO_STDOUT) $(STDOUT_TO_DEVNULL) $(TEE_STDERR)`" ] || { $(RM) $@; exit 1; } %.rc: %.ico $(ECHO) '1 ICON "$<"' > $@