Better clang setup in Makefile

This commit is contained in:
Tim Warren 2015-04-22 09:19:09 -04:00
parent 68c437d0fd
commit cc644270e4
3 changed files with 8 additions and 5 deletions

View File

@ -1,11 +1,11 @@
#Try using clang, if it's installed #Try using clang, if it's installed
ifneq ($(shell command -v clang),) ifneq ($(shell command -v clang),)
CC = clang CC = clang
CXX = $(patsubst g++,clang++, $(shell wx-config --cxx)) -std=c++98 -I/include CXX = clang++ -std=c++98
else
CXX = $(shell wx-config --cxx) -I/include
endif endif
CXX += -Iinclude
SOURCES = $(wildcard include/**/*.cpp src/network/*.cpp src/settings/*.cpp include/*.cpp) SOURCES = $(wildcard include/**/*.cpp src/network/*.cpp src/settings/*.cpp include/*.cpp)
OBJECTS = $(patsubst %.cpp,%.o, $(SOURCES)) OBJECTS = $(patsubst %.cpp,%.o, $(SOURCES))
TARGET = build/Tyro.a TARGET = build/Tyro.a
@ -30,6 +30,9 @@ TESTS = $(patsubst %.cpp,%,$(TEST_SRC))
OS ?= $(shell uname -s) OS ?= $(shell uname -s)
ifeq ($(OS),Darwin)
CXX += -mmacosx-version-min=10.5
endif
ifeq ($(OS),Windows_NT) ifeq ($(OS),Windows_NT)
LDLIBS += -L/lib LDLIBS += -L/lib
endif endif

View File

@ -18,7 +18,7 @@ bool TyroApp::OnInit()
this->SetAppName(APP_NAME); this->SetAppName(APP_NAME);
this->SetVendorName(APP_VENDOR); this->SetVendorName(APP_VENDOR);
MainFrame* frame = new MainFrame(0L, _("Tyro")); MainFrame* frame = new MainFrame(0L, "Tyro");
SetTopWindow(frame); SetTopWindow(frame);

View File

@ -2,7 +2,7 @@
#define TYRO_CONFIG_H #define TYRO_CONFIG_H
#include "../common.h" #include "../common.h"
#include "../../include/json/json.h" #include <json/json.h>
typedef Json::Value JsonValue; typedef Json::Value JsonValue;
typedef Json::Reader JsonReader; typedef Json::Reader JsonReader;