first init of 0.9

This commit is contained in:
cnjinhao
2014-12-11 03:32:35 +08:00
commit d0a317bd45
206 changed files with 69773 additions and 0 deletions

42
build/makefile/makefile Normal file
View File

@@ -0,0 +1,42 @@
#Nana C++ Library
#
#Makefile created by Jinhao(cnjinhao@hotmail.com)
GCC = g++
INCROOT = ../../include
SRCROOT = ../../source
NANA_INC= $(INCROOT)/nana
INCS = -I$(INCROOT) -I/usr/include/freetype2
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)
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)
LINKOBJ = $(SOURCES:.cpp=.o)
$(BIN): $(LINKOBJ)
ar r ../bin/$(BIN) $(LINKOBJ)
ranlib ../bin/$(BIN)
.cpp.o:
$(GCC) -g -c $< -o $@ $(INCS) -std=c++0x -Wall
clean:
rm -f $(LINKOBJ)
rm -f ../bin/$(BIN)

31
build/makefile/readme.txt Normal file
View File

@@ -0,0 +1,31 @@
Building Nana C++ Library
requires:
X11, pthread, Xpm, rt, dl, freetype2, Xft, fontconfig, ALSA
Writing a makefile for creating applications with Nana C++ Library
-------------------
GCC = g++
NANAPATH = [The folder of Nana C++ Library]
BIN = [The bin file what you want to create.]
SOURCES = [The source file of your application.]
NANAINC = $(NANAPATH)/include
NANALIB = $(NANAPATH)/build/bin
INCS = -I$(NANAINC)
LIBS = -L$(NANALIB) -lnana -lX11 -lpthread -lrt -lXft -lpng -lasound
LINKOBJ = $(SOURCES:.cpp=.o)
$(BIN): $(LINKOBJ) $(NANALIB)/libnana.a
$(GCC) $(LINKOBJ) $(INCS) $(LIBS) -o $(BIN) -std=c++0x
.cpp.o:
$(GCC) -g -c $< -o $@ $(INCS) -std=c++0x
$(NANALIB):
make -f $(NANAPATH)/build/makefile/makefile
clean:
rm -f $(LINKOBJ)
-------------------