Fixed a load of issues, clang autodetection works now.

This fixes issue #210.
This also removes the disableasm option, so it would be wise to remove
it from any scripts that use it.
I also removed a random line in the middle of globals.h, why was it
there?
master
Alexander Harkness 2013-11-27 17:18:40 +00:00
parent 3568adafc2
commit 596963743e
2 changed files with 6 additions and 20 deletions

View File

@ -74,7 +74,9 @@ else
CC_OPTIONS = -s -ggdb -g -D_DEBUG -O3
CXX_OPTIONS = -s -ggdb -g -D_DEBUG -O1
LNK_OPTIONS = -pthread -g -ggdb -O1
BUILDDIR = build/debug/
endif
endif
@ -86,11 +88,9 @@ CXX_OPTIONS += -Wall
###################################################
# Fix Crypto++ warnings in clang
ifeq ($(shell $(CXX) --version 2>&1 | grep -i -c "clang version"),0)
CC_OPTIONS += -Wno-tautological-compare
CXX_OPTIONS += -Wno-tautological-compare
disableasm = 1
disableofast = 1
ifeq ($(shell $(CXX) --version 2>&1 | grep -i -c "clang version"),1)
CC_OPTIONS += -DCRYPTOPP_DISABLE_ASM
CXX_OPTIONS += -DCRYPTOPP_DISABLE_ASM
endif
@ -125,23 +125,10 @@ endif
###################################################
# Clang doesn't seem to support CryptoPP's assembly mode, disable it for now (CryptoPP 5.6.2)
ifeq ($(disableasm),1)
CC_OPTIONS += -DCRYPTOPP_DISABLE_ASM
CXX_OPTIONS += -DCRYPTOPP_DISABLE_ASM
endif
###################################################
# INCLUDE directories for MCServer
INCLUDE = -I.\
-Isrc\
INCLUDE = -Isrc\
-Ilib\
-Ilib/jsoncpp/include

View File

@ -118,7 +118,6 @@ typedef unsigned short UInt16;
#include <dirent.h>
#include <errno.h>
#include <iostream>
#include <cstdio>
#include <cstring>
#include <pthread.h>