-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile_linux
104 lines (83 loc) · 4.27 KB
/
makefile_linux
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
FilePre=20110713
#export CPATH=/usr/local/include:$(HOME)/ACE_wrappers/:/cygdrive/d/boost_1_36_0:$(HOME)/src/include:/cygdrive/d/oracle/oci/include
#export GLIBCXX_FORCE_NEW=1
#export LIBRARY_PATH=/cygdrive/d/boost_1_37_0/stage/lib:$HOME/usr/w32api/lib:/usr/local/lib:$(HOME)/ACE_wrappers/lib:/cygdrive/d/oracle/oci/lib/msvc
#MHOME=E:/mingw/msys/1.0/home/Bonly
#if use wssocket add -l ws2_32 -l mswsock -D__USE_W32_SOCKETS
#WIN_SOCK_LIB=-l ws2_32 -l mswsock -l boost_system-gcc34-mt-1_36.dll
#WIN_LIB=-l kernel32 -l user32 -l gdi32 -lwinmm -ldxguid
#mingw32 wtsapi32 advapi32 netapi32
#glu32 glut32 opengl32 (for opengl)
#boost_thread-gcc34-mt-1_37 boost_date_time-gcc34-mt-1_37
#boost_regex-gcc34-mt-1_37
#boost_system-gcc34-mt-1_37
INC_NANA="/home/opt/nana/include" "/usr/include/freetype2"
INC_BOOST="/home/bonly/boost" "/home/opt/cpp-netlib/" "/usr/include/python2.7"
INC_NANOPB= "/home/bonly/nanopb"
INC_MYSQL="/usr/local/mysql/include/"
INC_JUCE="/home/bonly/JUCE"
INC_LUA="/home/opt/lua-5.2.2/src" "/home/opt/luabind5.2-master"
#INC_MING="E:\mingw\lib\gcc\mingw32\4.6.2\include\c++" e:/mingw/include e:/workspace/box D:\BREW\inc "C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\Include\gl"
INC=$(INC_BOOST)
CFLAGS=-O0 -g3 -Wall -fmessage-length=0
#-D"LINUX=1"
#-console -mwindows
#-Wl,--whole-archive
#-enable-auto-import
CXXFLAGS= $(CFLAGS) -std=c++11 -DBOOST_ALL_DYN_LINK -DBOOST_LOG_USE_NATIVE_SYSLOG=1 -Wno-unused-local-typedefs
#-DBOOST_ALL_DLL
#-D_WIN32_WINNT=0x0501
#-D__USE_W32_SOCKETS
#-m32 32bit
#-m64 64bit
CXX = g++
#-fno-omit-frame-pointer
LIBPATH_BOOST=${HOME}/boost/stage/lib
LIBPATH_PYTHON=/usr/lib
LIB_PYTHON=python2.7
LIBP_NANA=/home/opt/nana/build/bin /home/opt/nana/extrlib
LIB_NANA=nana X11 pthread Xft png asound
LIBP_LUA=/home/opt/lua-5.2.2/src
LIBP_NETLIB=/home/opt/cpp-netlib/./mybuild/libs/network/src/
LIB_NETLIB=cppnetlib-server-parsers
#/e/mingw/lib E:/temp/Box2D D:/SDL-1.2.15/build/.libs
#E:/mingw/lib e:/workspace/Box2D/Debug E:/workspace/glui/Debug E:/workspace/freeglut/Debug
#-L $(HOME)/usr/w32api/lib
#SDLLIBS=$(shell sdl-config --libs)
#SDLFlAGS=$(shell sdl-config --cflags)
#SDLFLAGS=-I$(MHOME)/opt/include/SDL -D_GNU_SOURCE=1 -Dmain=SDL_main
#SDLLIBS=-L$(MHOME)/opt/lib -lmingw32 -lSDLmain -lSDL -liconv -lm -luser32 -lgdi32 -lwinmm
#gtk_inc=-mms-bitfields -ID:/GTK/include/gtkmm-2.4 -ID:/GTK/lib/gtkmm-2.4/include -ID:/GTK/include/glibmm-2.4 -ID:/GTK/lib/glibmm-2.4/include -ID:/GTK/include/gdkmm-2.4 -ID:/GTK/lib/gdkmm-2.4/include -ID:/GTK/include/pangomm-1.4 -ID:/GTK/include/atkmm-1.6 -ID:/GTK/include/gtk-2.0 -ID:/GTK/include/sigc++-2.0 -ID:/GTK/lib/sigc++-2.0/include -ID:/GTK/include/glib-2.0 -ID:/GTK/lib/glib-2.0/include -ID:/GTK/lib/gtk-2.0/include -ID:/GTK/include/cairomm-1.0 -ID:/GTK/include/pango-1.0 -ID:/GTK/include/cairo -ID:/GTK/include/freetype2 -ID:/GTK/include -ID:/GTK/include/atk-1.0
#gtk_lib=-user32 -Wl,-luuid -LD:/GTK/lib -lgtkmm-2.4 -lgdkmm-2.4 -latkmm-1.6 -lgtk-win32-2.0 -lpangomm-1.4 -lcairomm-1.0 -lglibmm-2.4 -lsigc-2.0 -lgdk-win32-2.0 -lgdi32 -limm32 -lshell32 -lole32 -latk-1.0 -lgdk_pixbuf-2.0 -lpangowin32-1.0 -lpangocairo-1.0 -lcairo -lpangoft2-1.0 -lfontconfig -lfreetype -lz -lpango-1.0 -lm -lgobject-2.0 -lgmodule-2.0 -lglib-2.0 -lintl -liconv
LIB_SCTP = sctp
LIBPATH= $(LIBP_NANA) $(LIBPATH_BOOST) $(LIBPATH_PYTHON) $(LIBP_LUA) /usr/local/mysql/lib/ $(LIBP_NETLIB)
LIBS= $(LIB_NETLIB) boost_thread boost_system pthread
#boost_thread boost_iostreams z
#luabindd lua dl
#boost_filesystem boost_system boost_chrono boost_date_time
#boost_python-gcc47-mt-1_51 python2.7 mysqlclient_r
FILES = $(wildcard $(FilePre)*.cc) $(wildcard $(FilePre)*.cpp)
SOURCES = $(notdir $(FILES))
OBJS = $(patsubst %.cpp,%.o,$(SOURCES))
EXE = $(patsubst %.cpp,%.exe,$(SOURCES))
GTK_CFG = `pkg-config --cflags gtk+-3.0` `pkg-config --libs gtk+-3.0`
all: $(EXE)
$(EXE): $(SOURCES)
@echo ========= building $^ ... =======
$(CXX) $(CXXFLAGS) \
$(addprefix -I, $(INC)) $^ -o $@ \
$(addprefix -L, $(LIBPATH)) $(addprefix -l, $(LIBS))
@echo ========= Finish. $^ =======
mv $(EXE) Debug
# $(SDLFLAGS)\
# $(SDLLIBS) \
#$(OBJS): %.o: %.cc
.PHONY:all clean test RM_O RM_EXE
RM_O:
-@rm -f $(OBJS) 2>/dev/null 2>/dev/null;
RM_EXE:
-@rm -f Debug/$(EXE) 2>/dev/null 2>/dev/null;
clean:RM_O RM_EXE
test:
@echo $(EXE)
@echo $(OBJS)