]> AND Private Git Repository - blast.git/blob - Makefile.in
Logo AND Algorithmique Numérique Distribuée

Private GIT Repository
pattern comput done
[blast.git] / Makefile.in
1 #############################################################################
2 # Makefile for building: @@APPNAME@@
3 #############################################################################
4
5 ####### VERSION (modified by the configure script) ############
6 APPNAME=@@APPNAME@@
7
8 ####### VERSION (modified by the configure script) ############
9 VERSION=@@APPVER@@
10
11 ####### OS (modified by the configure script) ############
12 OS=@@OS@@
13 ARCH=@@ARCH@@
14
15 ####### Qt (modified by the configure script) ############
16 QTVER=@@QTVER@@
17 QTPATH=@@QTPATH@@
18
19 ####### PATHES ############
20 BUILDDIR=build
21 DISTDIR=dist
22 BUILDPATH=$(BUILDDIR)/$(OS)$(ARCH)
23 DISTPATH=$(DISTDIR)/$(OS)$(ARCH)/$(APPNAME)-$(VERSION)
24 ARDIR=archive
25 ARPATH=$(ARDIR)/$(APPNAME)/v$(VERSION)
26
27 ####### COMPILERS ############
28 CC-lin32        = gcc
29 CXX-lin32       = g++
30 CC-lin64        = gcc
31 CXX-lin64       = g++
32 CC-win32        = i686-w64-mingw32-gcc-win32
33 CXX-win32       = i686-w64-mingw32-g++-win32
34 WINDRES-win32   = i686-w64-mingw32-windres
35 CC-win64        = x86_64-w64-mingw32-gcc-win32
36 CXX-win64       = x86_64-w64-mingw32-g++-win32
37 WINDRES-win64   = x86_64-w64-mingw32-windres
38
39 CC            = $(CC-$(OS)$(ARCH))
40 CXX           = $(CXX-$(OS)$(ARCH))
41 WINDRES       = $(WINDRES-$(OS)$(ARCH))
42
43 DEFINES-lin32     = -DDEBUG  -DQT_NO_DEBUG -DQT_XML_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -D@@APPDEF@@_LIN
44 DEFINES-lin64     = -DDEBUG  -DQT_NO_DEBUG -DQT_XML_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -D@@APPDEF@@_LIN
45 DEFINES-win32     = -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_NO_DEBUG -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -DQT_AXCONTAINER_LIB -DQT_PRINTSUPPORT_LIB -DQT_AXBASE_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_XML_LIB -D@@APPDEF@@_WIN
46
47 DEFINES       = $(DEFINES-$(OS)$(ARCH))
48
49 CFLAGS-lin32      = @@DEBUG@@ -pipe -O2 -Wall -fPIC -D_REENTRANT $(DEFINES)
50 CFLAGS-lin64      = @@DEBUG@@ -pipe -O2 -Wall -fPIC -D_REENTRANT $(DEFINES)
51 CXXFLAGS-lin32    = @@DEBUG@@ -pipe -O2 -Wall -fPIC -D_REENTRANT $(DEFINES)
52 CXXFLAGS-lin64    = @@DEBUG@@ -pipe -O2 -Wall -fPIC -D_REENTRANT $(DEFINES)
53 CFLAGS-win32      = @@DEBUG@@ -pipe -fno-keep-inline-dllexport -O2 -Wall -Wextra $(DEFINES)
54 CXXFLAGS-win32    = @@DEBUG@@ -pipe -fno-keep-inline-dllexport -O2 -frtti -Wall -Wextra -fexceptions -mthreads $(DEFINES)
55
56 CFLAGS       = $(CFLAGS-$(OS)$(ARCH))
57 CXXFLAGS     = $(CXXFLAGS-$(OS)$(ARCH))
58
59 INCPATH-lin64-qt4       = -I/usr/share/qt4/mkspecs/linux-g++ -I$(QTPATH)/QtCore -I$(QTPATH)/QtGui -I$(QTPATH)/QtNetwork -I$(QTPATH)/QtXml -I$(QTPATH)/QtXmlPatterns -I$(QTPATH)
60 INCPATH-lin64-qt5       = -I$(QTPATH)/mkspecs/linux-g++-64 -I$(QTPATH) -I$(QTPATH)/QtWidgets -I$(QTPATH)/QtCore -I$(QTPATH)/QtGui -I$(QTPATH)/QtPrintSupport -I$(QTPATH)/QtNetwork -I$(QTPATH)/QtXml -I$(QTPATH)/QtXmlPatterns 
61 INCPATH-win32-qt5       = -I$(QTPATH)/mkspecs/win32-g++ -I$(QTPATH)/include -I$(QTPATH)/include/ActiveQt -I$(QTPATH)/include/QtWidgets -I$(QTPATH)/include/QtGui -I$(QTPATH)/include/QtCore -I$(QTPATH)/include/QtXml -I$(QTPATH)/include/QtXmlPatterns -I$(QTPATH)/include/QtPrintSupport
62
63 INCPATH       = $(INCPATH-$(OS)$(ARCH)-qt$(QTVER)) -I.
64
65 ################## LINKER #####################
66 LINK-lin32        = g++
67 LINK-lin64        = g++
68 LINK-win32        = i686-w64-mingw32-g++-win32
69 LINK-win64        = x86_64-w64-mingw32-g++-win32
70
71 LINK     = $(LINK-$(OS)$(ARCH))
72
73 LFLAGS-lin32        =  -m32 -Wl,-O1
74 LFLAGS-lin64        =  -m64 -Wl,-O1
75 LFLAGS-win32        = -Wl,-s -mthreads -Wl,-subsystem,console -mthreads -static-libgcc -static-libstdc++
76 LFLAGS-win64        = -Wl,-s -mthreads -Wl,-subsystem,console -mthreads -static-libgcc -static-libstdc++
77
78 LFLAGS     = $(LFLAGS-$(OS)$(ARCH))
79
80 LIBS-lin64-qt4  = -lQtCore -lQtGui -lQtXml -lQtXmlPatterns -lpthread -lm
81 LIBS-lin64-qt5  = -lQt5Core -lQt5Gui -lQt5Xml -lQt5XmlPatterns -lQt5Widgets -lQt5PrintSupport -lQt5Network -lpthread -lm
82 LIBS-win32-qt5  =  -lmingw32 -L$(QTPATH)/lib -lqtmain -lQt5AxContainer -lQt5PrintSupport -lQt5AxBase -lglu32 -lopengl32 -lole32 -loleaut32 -luser32 -lgdi32 -ladvapi32 -luuid -lQt5Widgets -lQt5Gui -lQt5Core -lQt5Xml -lQt5XmlPatterns -lQt5Network -lm -lws2_32
83
84 LIBS          = $(LIBS-$(OS)$(ARCH)-qt$(QTVER))
85
86 ################## OBJECTS #####################
87 include object-files.txt
88
89 OBJ-lin           = $(COMMON-OBJ)
90 OBJ-win           = $(COMMON-OBJ) $(BUILDPATH)/$(APPNAME)_res.o
91
92 OBJ     = $(OBJ-$(OS))
93
94 ################## EXECUTBALE ####################
95 EXENAME-lin    = $(APPNAME)
96 EXENAME-win    = $(APPNAME).exe
97
98 EXENAME = $(EXENAME-$(OS))
99
100 all: $(BUILDPATH)/$(EXENAME)
101
102 $(BUILDPATH)/$(EXENAME) : $(OBJ)
103         $(LINK) $(LFLAGS) -o $@ $^ $(LIBS)
104         cp $(BUILDPATH)/$(EXENAME) .
105
106 $(BUILDPATH)/$(APPNAME)_res.o: $(APPNAME).rc
107         $(WINDRES) -i $(APPNAME).rc -o $(BUILDPATH)/$(APPNAME)_res.o --include-dir=. $(DEFINES)
108
109 ################## DISTRIBUTION ARCHIVE #####################
110 DISTNAME = dist-$(OS)
111
112 dist : $(DISTNAME)
113
114 dist-lin: $(BUILDPATH)/$(APPNAME)
115         @echo -n creating binary distribution archive for Linux ...
116         @-rm -rf $(DISTPATH)
117         @-mkdir -p $(DISTPATH)
118         @-mkdir -p $(DISTPATH)/locales
119         @cp $(BUILDPATH)/$(APPNAME) $(DISTPATH)
120         @if ls $(APPNAME)_*.qm 2>/dev/null 1>&2; then for loc in $(APPNAME)_*.qm; do cp $$loc $(DISTPATH)/locales; done; fi
121         @cp install.sh $(DISTPATH)
122         @if [ -d examples ]; then cp -r examples $(DISTPATH); fi
123         @cd $(DISTPATH); cd ..; tar zcf $(APPNAME)-$(VERSION)_$(OS)$(ARCH).tgz $(APPNAME)-$(VERSION); rm -rf $(APPNAME)-$(VERSION)
124         @echo done; echo result is in $(DISTDIR)/$(OS)$(ARCH)/$(APPNAME)-$(VERSION)_$(OS)$(ARCH).tgz
125
126 dist-win: $(BUILDPATH)/$(EXENAME)
127         @echo -n creating binary distribution archive for Windows ...
128         @rm -rf $(DISTPATH)
129         @mkdir -p $(DISTPATH)
130         @cp $(BUILDPATH)/$(APPNAME).exe $(DISTPATH)
131         @cp -r lib/$(OS)$(ARCH)/* $(DISTPATH)
132         @if ls $(APPNAME)_*.qm 2>/dev/null 1>&2; then for loc in $(APPNAME)_*.qm; do cp $$loc $(DISTPATH); done; fi
133         @if [ -d examples ]; then cp -r examples $(DISTPATH); fi
134         @cd $(DISTPATH); cd ..; zip -r $(APPNAME)-$(VERSION)_$(OS)$(ARCH).zip $(APPNAME)-$(VERSION)/* ; rm -rf $(APPNAME)-$(VERSION)
135         @echo done; echo result is in $(DISTDIR)/$(OS)$(ARCH)/$(APPNAME)-$(VERSION)_$(OS)$(ARCH).zip
136
137 src-dist:
138         @echo -n creating source archive ...
139         @rm -rf $(ARPATH)
140         @mkdir -p $(ARPATH)
141         @cp *.cpp $(ARPATH)
142         @cp *.h $(ARPATH)
143 # copying various files: translations (.ts), locales (.qm), resources (.qrc), xml related (.xml,.xsd), config. files (.conf) ...
144         @if ls $(APPNAME)_*.ts 2>/dev/null 1>&2; then for loc in $(APPNAME)_*.ts; do cp $$loc $(ARPATH); done; fi
145         @if ls $(APPNAME)_*.qm 2>/dev/null 1>&2; then for loc in $(APPNAME)_*.qm; do cp $$loc $(ARPATH); done; fi
146         @if ls *.conf 2>/dev/null 1>&2; then for loc in *.conf; do cp $$loc $(ARPATH); done; fi
147         @if ls *.xml 2>/dev/null 1>&2; then for loc in *.xml; do cp $$loc $(ARPATH); done; fi
148         @if ls *.xsd 2>/dev/null 1>&2; then for loc in *.xsd; do cp $$loc $(ARPATH); done; fi
149         @if [ -f $(APPNAME).qrc ]; then cp $(APPNAME).qrc $(ARPATH); fi
150         @if [ -d icons ]; then cp -r icons $(ARPATH); fi
151         @if [ -d examples ]; then cp -r examples $(ARPATH); fi
152         @cp -r lib $(ARPATH)
153         @cp install.sh.in $(ARPATH)
154         @cp Makefile.in $(ARPATH)
155         @cp object-files.txt $(ARPATH)
156         @cp configure $(ARPATH)
157         @if [ -f $(APPNAME).rc ]; then cp $(APPNAME).rc $(ARPATH); fi
158         @if [ -f $(APPNAME).ico ]; then cp $(APPNAME).ico $(ARPATH); fi
159         @cp $(APPNAME).creator $(ARPATH)
160         @if [ -f $(APPNAME).creator.user ]; then cp $(APPNAME).creator.user $(ARPATH); fi
161         @cp $(APPNAME).files $(ARPATH)
162         @cp $(APPNAME).includes $(ARPATH)
163         @if [ -f $(APPNAME).config ]; then cp $(APPNAME).config $(ARPATH); fi
164         @cd $(ARPATH); cd ../..; tar zcf $(APPNAME)-$(VERSION)-src.tgz $(APPNAME); rm -rf $(APPNAME)
165         @echo done; echo result is in $(ARDIR)/$(APPNAME)-$(VERSION)-src.zip
166 clean:
167         rm -f $(OBJ)
168         rm -f *~
169         rm -f moc_*.cpp
170         rm -f rcc_*.cpp
171         rm -f $(BUILDPATH)/$(EXENAME)
172         rm -f $(EXENAME)        
173
174 ### NEW RULES ###
175 $(BUILDPATH)/%.o : %.cpp
176         $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<
177
178 moc_%.cpp : %.h
179         /usr/bin/moc -qt=$(QTVER) $(DEFINES) $(INCPATH) -o $@ $<
180
181 rcc_%.cpp : %.qrc
182         /usr/bin/rcc -qt=$(QTVER) $< -o $@ -name $*
183
184 ### DEPENDENCIES OF EACH SOURCE FILE (auto-added by configure) ###
185