diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 55 |
1 files changed, 49 insertions, 6 deletions
@@ -1,4 +1,11 @@ -CPPFLAGS=-Wall -pipe -DNDEBUG -DwxUSE_UNICODE `wx-config --cxxflags --debug=no --unicode=yes` `pkg-config --cflags gtk+-2.0` -DFFS_LINUX -DTIXML_USE_STL -DZSTRING_CHAR -O3 -pthread -c -Ishared/boost_1_x +APPNAME = FreeFileSync + +prefix = /usr +BINDIR = $(DESTDIR)$(prefix)/bin +SHAREDIR = $(DESTDIR)$(prefix)/share +APPSHAREDIR = $(SHAREDIR)/$(APPNAME) + +FFS_CPPFLAGS=-Wall -pipe -DNDEBUG -DwxUSE_UNICODE `wx-config --cxxflags --debug=no --unicode=yes` `pkg-config --cflags gtk+-2.0` -DFFS_LINUX -DTIXML_USE_STL -DZSTRING_CHAR -O3 -pthread -c -Ishared/boost_1_x LINKFLAGS=`wx-config --libs --debug=no --unicode=yes` shared/ossp_uuid/.libs/libuuid++.a -O3 -pthread FILE_LIST= #internal list of all *.cpp files needed for compilation @@ -17,6 +24,9 @@ FILE_LIST+=ui/checkVersion.cpp FILE_LIST+=ui/batchStatusHandler.cpp FILE_LIST+=ui/guiStatusHandler.cpp FILE_LIST+=ui/trayIcon.cpp +FILE_LIST+=ui/search.cpp +FILE_LIST+=ui/messagePopup.cpp +FILE_LIST+=ui/progressIndicator.cpp FILE_LIST+=library/customGrid.cpp FILE_LIST+=library/errorLogging.cpp FILE_LIST+=library/statusHandler.cpp @@ -25,6 +35,7 @@ FILE_LIST+=ui/smallDialogs.cpp FILE_LIST+=library/processXml.cpp FILE_LIST+=library/statistics.cpp FILE_LIST+=library/filter.cpp +FILE_LIST+=library/binary.cpp FILE_LIST+=shared/dragAndDrop.cpp FILE_LIST+=shared/localization.cpp FILE_LIST+=shared/guid.cpp @@ -46,6 +57,8 @@ FILE_LIST+=shared/toggleButton.cpp FILE_LIST+=shared/customComboBox.cpp FILE_LIST+=shared/serialize.cpp FILE_LIST+=shared/fileID.cpp +FILE_LIST+=shared/recycler.cpp +FILE_LIST+=shared/helpProvider.cpp #list of all *.o files OBJECT_LIST=$(foreach file, $(FILE_LIST), OBJ/$(subst .cpp,.o,$(notdir $(file)))) @@ -53,6 +66,21 @@ OBJECT_LIST=$(foreach file, $(FILE_LIST), OBJ/$(subst .cpp,.o,$(notdir $(file))) #build list of all dependencies DEP_LIST=$(foreach file, $(FILE_LIST), $(subst .cpp,.dep,$(file))) +#support for Glib-IO/GIO recycler +#Recycle bin: check whether GLIB library is existing (and add relevant compiler and linker flags) +GIO_EXISTING=$(shell pkg-config --exists gio-2.0 && echo YES) +ifeq ($(GIO_EXISTING),YES) +FFS_CPPFLAGS+=-DRECYCLER_GIO `pkg-config --cflags gio-2.0` +LINKFLAGS+=`pkg-config --libs gio-2.0` +else +FFS_CPPFLAGS+=-DRECYCLER_NONE +$(warning ) +$(warning -----------------------------------------------------------------------------------------) +$(warning | Warning: No gio-2.0 package found: Recycle Bin will NOT be available for this system! |) +$(warning -----------------------------------------------------------------------------------------) +$(warning ) +endif + all: FreeFileSync @@ -65,14 +93,29 @@ removeBOM: tools/removeBOM.cpp ./removeBOM shared/localization.cpp osspUUID: - cd shared/ossp_uuid && chmod +x configure && chmod +x shtool && ./configure --with-cxx --disable-shared && make clean && make && make check + cd shared/ossp_uuid && \ + chmod +x configure && \ + chmod +x shtool && \ + ./configure --with-cxx --disable-shared && \ + make && \ + make check %.dep : %.cpp - #strip path information - g++ $(CPPFLAGS) $< -o OBJ/$(subst .cpp,.o,$(notdir $<)) +#strip path information + g++ $(FFS_CPPFLAGS) $< -o OBJ/$(subst .cpp,.o,$(notdir $<)) FreeFileSync: init removeBOM osspUUID $(DEP_LIST) - g++ -o BUILD/FreeFileSync $(OBJECT_LIST) $(LINKFLAGS) + g++ -o BUILD/$(APPNAME) $(OBJECT_LIST) $(LINKFLAGS) clean: - find OBJ -type f -exec rm {} \; + rm -rf OBJ + rm -f BUILD/$(APPNAME) + cd shared/ossp_uuid && make clean + rm -f removeBOM + +install: + if [ ! -d $(BINDIR) ] ; then mkdir -p $(BINDIR); fi + if [ ! -d $(APPSHAREDIR) ] ; then mkdir -p $(APPSHAREDIR); fi + + cp BUILD/$(APPNAME) $(BINDIR) + cp -R BUILD/Languages/ BUILD/Help/ BUILD/Compare_Complete.wav BUILD/Sync_Complete.wav BUILD/Resources.dat BUILD/Changelog.txt BUILD/License.txt BUILD/styles.rc $(APPSHAREDIR) |