From 899dc3db719658cdde40cc148e2ee1538f811143 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9gory=20Soutad=C3=A9?= Date: Thu, 23 Oct 2014 21:06:27 +0200 Subject: [PATCH] Update Makefile for WIN32 and copyright date --- Makefile | 29 ++++++++++++++++------------- src/view/wxUI.cpp | 2 +- 2 files changed, 17 insertions(+), 14 deletions(-) diff --git a/Makefile b/Makefile index 49e9e0e..5a4e9cc 100644 --- a/Makefile +++ b/Makefile @@ -4,24 +4,20 @@ SHARE_DIR=$(DESTDIR)$(ROOT_DIR)"/share/kisscount/" DOC_DIR=$(DESTDIR)$(ROOT_DIR)"/share/doc/kisscount/" BIN_DIR=$(DESTDIR)$(ROOT_DIR)"/bin/" +CXX=$(HOST)g++ +KISSCOUNT=kc + QT_PACKAGES="QtCore QtGui QtSql QtXml" CXXFLAGS+=`pkg-config --cflags $(QT_PACKAGES)` -CXXFLAGS+=-Wall -Isrc -Isrc/win32 -ggdb -fPIC +CXXFLAGS+=-Wall -Isrc -Isrc/win32 ifdef WIN32 CXXFLAGS+=-DRESSOURCES_ROOT="\"./ressources/\"" else -CXXFLAGS+=-DRESSOURCES_ROOT="\"$(SHARE_DIR)\"" +CXXFLAGS+=-DRESSOURCES_ROOT="\"$(SHARE_DIR)\"" -ggdb -fPIC # For developpers #CXXFLAGS+=-DRESSOURCES_ROOT="\"./ressources/\"" endif -LDFLAGS+=`pkg-config --libs $(QT_PACKAGES)` -ifndef WIN32 -LDFLAGS+=-lofx -endif - -CXX=$(HOST)g++ - SOURCES=$(shell find src -name '*.cpp' -type f | tr '\n' ' ') OBJS=$(SOURCES:.cpp=.o) MOC_HEADERS=$(shell find src/view -name '*.hpp' -type f | tr '\n' ' ') @@ -38,7 +34,14 @@ KDCHART_MOCS=$(KDCHART_MOC_HEADERS:.h=.objs) KDCHART_MOCS_OBJS=$(KDCHART_MOC_HEADERS:.h=.moc) LDFLAGS+=lib/libkdchart.a -all: mojito lib/libkdchart.a kc +ifndef WIN32 +LDFLAGS+=`pkg-config --libs $(QT_PACKAGES)` +LDFLAGS+=-lofx +else +LDFLAGS+=lib/QtCore4.dll lib/QtGui4.dll lib/QtSql4.dll lib/QtXml4.dll +endif + +all: mojito lib/libkdchart.a $(KISSCOUNT) clean_all: clean clean_libkdchart @@ -47,7 +50,7 @@ clean: find src -type f -name '*~' -delete find src -type f -name '*.moc' -delete find src -type f -name '*.objs' -delete - rm -f kc + rm -f $(KISSCOUNT) %.o : %.cpp $(CXX) $(CXXFLAGS) -c $< -o $@ @@ -63,7 +66,7 @@ clean: mojito : $(MOCS_OBJS) $(KDCHART_MOCS_OBJS) -kc: $(MOCS) $(OBJS) +$(KISSCOUNT): $(MOCS) $(OBJS) $(CXX) $(CXXFLAGS) $^ -o $@ $(LDFLAGS) $(UI_CHARTSELECTOR): lib/libkdchart/src/KDChartDatasetSelector.ui @@ -92,7 +95,7 @@ endif install: mkdir -p $(BIN_DIR) $(SHARE_DIR) $(DOC_DIR) - cp kc $(BIN_DIR) + cp $(KISSCOUNT) $(BIN_DIR) cp -rf ressources/* $(SHARE_DIR) rm -rf $(SHARE_DIR)/po/* # Only copy qm files cp -rf ressources/po/*.qm $(SHARE_DIR)/po/ diff --git a/src/view/wxUI.cpp b/src/view/wxUI.cpp index d9aee22..9516712 100644 --- a/src/view/wxUI.cpp +++ b/src/view/wxUI.cpp @@ -314,7 +314,7 @@ void wxUI::ChangeUser() void wxUI::OnButtonAbout() { - QMessageBox::information(0, "KissCount " APP_VERSION, _("Personal accounting software") + "\n\nhttp://indefero.soutade.fr/p/kisscount/\n\n" + _("Licenced under GNU GPL v3") + "\n\nCopyright (C) 2010-2012 Grégory Soutadé"); + QMessageBox::information(0, "KissCount " APP_VERSION, _("Personal accounting software") + "\n\nhttp://indefero.soutade.fr/p/kisscount/\n\n" + _("Licenced under GNU GPL v3") + "\n\nCopyright (C) 2010-2014 Grégory Soutadé"); } void wxUI::OnButtonQuit()