From 5ba6d52774f76aa315d714c10bd4e273faf0cc45 Mon Sep 17 00:00:00 2001 From: Jinhao Date: Fri, 24 Jun 2016 11:48:15 +0800 Subject: [PATCH] debug a crash for travis --- build/makefile/makefile | 54 ++++++++++++++++++++++++----------------- include/nana/config.hpp | 2 +- 2 files changed, 33 insertions(+), 23 deletions(-) diff --git a/build/makefile/makefile b/build/makefile/makefile index db31cf6e..9f0fb052 100644 --- a/build/makefile/makefile +++ b/build/makefile/makefile @@ -1,43 +1,53 @@ #Nana C++ Library # -#Makefile created by Jinhao(cnjinhao@hotmail.com) +#Makefile created by sarrow104(sarrow104@gmail.com) GCC = g++ INCROOT = ../../include SRCROOT = ../../source EXTRLIB = ../../extrlib NANA_INC= $(INCROOT)/nana +OUTROOT = out +#CXXFLAGS= -g -std=c++11 -Wall +CXXFLAGS= -g -fexceptions -std=c++11 -Wall -Wextra -Wunused-variable -Wfatal-errors INCS = -I$(INCROOT) -I/usr/include/freetype2 -I$(EXTRLIB) BIN = libnana.a -SRC_NANA = $(wildcard $(SRCROOT)/*.cpp) -SRC_DETAIL = $(wildcard $(SRCROOT)/detail/*.cpp) -SRC_FILESYSTEM = $(wildcard $(SRCROOT)/filesystem/*.cpp) -SRC_AUDIO = $(wildcard $(SRCROOT)/audio/*.cpp) -SRC_AUDIO_DETAIL = $(wildcard $(SRCROOT)/audio/detail/*.cpp) -SRC_GUI = $(wildcard $(SRCROOT)/gui/*.cpp) -SRC_GUI_DETAIL = $(wildcard $(SRCROOT)/gui/detail/*.cpp) -SRC_GUI_WIDGETS = $(wildcard $(SRCROOT)/gui/widgets/*.cpp) -SRC_GUI_WIDGETS_SKELETONS = $(wildcard $(SRCROOT)/gui/widgets/skeletons/*.cpp) -SRC_PAINT = $(wildcard $(SRCROOT)/paint/*.cpp) -SRC_PAINT_DETAIL = $(wildcard $(SRCROOT)/paint/detail/*.cpp) -SRC_SYSTEM = $(wildcard $(SRCROOT)/system/*.cpp) -SRC_THREADS= $(wildcard $(SRCROOT)/threads/*.cpp) +TARGET = ../bin/$(BIN) -SOURCES = $(SRC_NANA) $(SRC_DETAIL) $(SRC_FILESYSTEM) $(SRC_AUDIO) $(SRC_AUDIO_DETAIL) $(SRC_GUI) $(SRC_GUI_DETAIL) $(SRC_GUI_WIDGETS) $(SRC_GUI_WIDGETS_SKELETONS) $(SRC_PAINT) $(SRC_PAINT_DETAIL) $(SRC_SYSTEM) $(SRC_THREADS) +.PHONY: all clean install print -LINKOBJ = $(SOURCES:.cpp=.o) +all: $(TARGET) -$(BIN): $(LINKOBJ) - ar r ../bin/$(BIN) $(LINKOBJ) - ranlib ../bin/$(BIN) +define walk +$(wildcard $(1)) $(foreach e, $(wildcard $(1)/*), $(call walk, $(e))) +endef -.cpp.o: - $(GCC) -g -c $< -o $@ $(INCS) -std=c++11 -Wall +SRCFILES := $(filter %.cpp,$(patsubst ./%,%,$(filter-out .,$(call walk, $(SRCROOT))))) + +LINKOBJ = $(patsubst $(SRCROOT)/%.cpp,$(OUTROOT)/objs/%.o,$(SRCFILES)) + +print: + @echo $(LINKOBJ) + +$(TARGET): $(LINKOBJ) + mkdir -p $(dir $@) + ar rus $@ $? + ranlib $@ + +$(OUTROOT)/objs/%.o: $(SRCROOT)/%.cpp + @mkdir -p $(dir $@) + $(GCC) -o $@ -c $< $(INCS) $(CXXFLAGS) clean: rm -f $(LINKOBJ) - rm -f ../bin/$(BIN) + rm -f $(TARGET) +install: + @mkdir -p $(INSTALL_PREFIX)/include + @mkdir -p $(INSTALL_PREFIX)/bin + @mkdir -p $(INSTALL_PREFIX)/lib + cp -rfl $(INCROOT)/* $(INSTALL_PREFIX)/include + cp -rfl $(TARGET) $(INSTALL_PREFIX)/lib/ diff --git a/include/nana/config.hpp b/include/nana/config.hpp index 0969af25..15bbaf70 100644 --- a/include/nana/config.hpp +++ b/include/nana/config.hpp @@ -95,7 +95,7 @@ //This marco is defined since 1.4 and until 1.5 for deprecating frame widget. //This marco and class frame will be removed in version 1.5 -#define WIDGET_FRAME_DEPRECATED +//#define WIDGET_FRAME_DEPRECATED /////////////////// // Support for NANA_AUTOMATIC_GUI_TESTING