# HG changeset patch # User Matti Hamalainen # Date 1496742697 -10800 # Node ID 43e14ba416e1a4b19789dd9d5f2674d28b0d0714 # Parent 50fb9b4e2751a53635095a3a5553b1f5421036ad Simplify build system. diff -r 50fb9b4e2751 -r 43e14ba416e1 Makefile --- a/Makefile Mon Apr 24 16:09:06 2017 +0300 +++ b/Makefile Tue Jun 06 12:51:37 2017 +0300 @@ -4,6 +4,7 @@ ### # Miscellaneous +QT5_MODULES = Core Gui Widgets Sql QT5_PREFIX = BINTOOL_PREFIX = @@ -14,13 +15,13 @@ # Compiler flags and linker flags DEFINES = -INCPATH = -I. `pkg-config --cflags Qt5Core Qt5Gui Qt5Widgets Qt5Sql` +INCPATH = -I. `pkg-config --cflags $(addprefix Qt5,$(QT5_MODULES))` CFLAGS += -pipe -O2 -Wall -W -D_REENTRANT -fPIC CXXFLAGS += -pipe -O2 -Wall -W -D_REENTRANT -fPIC LDFLAGS += -Wl,-O1 -APP_LIBS += `pkg-config --libs Qt5Core Qt5Gui Qt5Widgets Qt5Sql` +APP_LIBS += `pkg-config --libs $(addprefix Qt5,$(QT5_MODULES))` APP_DEP_LIBS = APP_DEPS = diff -r 50fb9b4e2751 -r 43e14ba416e1 Makefile.cross-mingw-win32 --- a/Makefile.cross-mingw-win32 Mon Apr 24 16:09:06 2017 +0300 +++ b/Makefile.cross-mingw-win32 Tue Jun 06 12:51:37 2017 +0300 @@ -3,6 +3,7 @@ ### # Miscellaneous +QT5_MODULES = Core Gui Widgets Sql QT5_PREFIX ?= /misc/packages/qt5-src QT5_BASE ?= $(QT5_PREFIX)/qtbase BINTOOL_PREFIX ?= i686-w64-mingw32- @@ -15,10 +16,7 @@ DEFINES = -DUNICODE -DQT_NEEDS_QMAIN INCPATH = -I. \ -I$(QT5_BASE)/include \ - -I$(QT5_BASE)/include/QtWidgets \ - -I$(QT5_BASE)/include/QtGui \ - -I$(QT5_BASE)/include/QtSql \ - -I$(QT5_BASE)/include/QtCore \ + $(addprefix -I$(QT5_BASE)/include/Qt,$(QT5_MODULES)) \ -I$(QT5_MULTIMEDIA)/include \ -I$(QT5_BASE)/mkspecs/win32-g++ @@ -29,10 +27,7 @@ APP_LIBS = -lglu32 -lopengl32 -lgdi32 -luser32 -lmingw32 \ -L$(QT5_BASE)/lib \ $(QT5_BASE)/lib/libqtmain.a \ - $(QT5_BASE)/lib/libQt5Widgets.a \ - $(QT5_BASE)/lib/libQt5Gui.a \ - $(QT5_BASE)/lib/libQt5Sql.a \ - $(QT5_BASE)/lib/libQt5Core.a + $(addsuffix .a,$(addprefix $(QT5_BASE)/lib/libQt5,$(QT5_MODULES))) APP_DEP_LIBS = $(OBJPATH)winres.o APP_DEPS =