2008-01-20 19:40:12 +01:00
|
|
|
# Eliot
|
|
|
|
# Copyright (C) 2008 Olivier Teulière
|
|
|
|
# Authors: Olivier Teulière <ipkiss @@ gmail.com>
|
|
|
|
#
|
|
|
|
# This program is free software; you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU General Public License as published by
|
|
|
|
# the Free Software Foundation; either version 2 of the License, or
|
|
|
|
# (at your option) any later version.
|
|
|
|
#
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with this program; if not, write to the Free Software
|
|
|
|
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
|
|
|
|
|
|
localedir = $(datadir)/locale
|
|
|
|
|
|
|
|
if BUILD_QT
|
|
|
|
|
2011-01-16 22:30:30 +01:00
|
|
|
AM_CPPFLAGS = -DLOCALEDIR=\"$(localedir)\" @QT_CFLAGS@ -DQT4LOCALEDIR=\"@QT4LOCALEDIR@\" -I$(top_srcdir) -I../intl -I$(top_srcdir)/dic -I$(top_srcdir)/game @LOG4CXX_CFLAGS@
|
2008-01-20 19:40:12 +01:00
|
|
|
|
|
|
|
SUFFIXES=.ui.h .moc.cpp
|
|
|
|
|
2008-09-07 15:17:39 +02:00
|
|
|
bin_PROGRAMS = eliot
|
2008-01-20 19:40:12 +01:00
|
|
|
|
2008-09-03 19:28:27 +02:00
|
|
|
RESOURCES = \
|
2010-05-13 00:12:31 +02:00
|
|
|
images/eliot.xpm \
|
|
|
|
images/go-first.png \
|
|
|
|
images/go-jump.png \
|
|
|
|
images/go-last.png \
|
|
|
|
images/go-next.png \
|
|
|
|
images/go-previous.png \
|
|
|
|
images/info_16px.png \
|
|
|
|
images/playlist_16px.png \
|
|
|
|
images/preferences.png \
|
|
|
|
images/printer.png \
|
|
|
|
images/quit_16px.png
|
2008-09-03 19:28:27 +02:00
|
|
|
|
2008-01-20 19:40:12 +01:00
|
|
|
EXTRA_DIST = \
|
2008-09-03 19:28:27 +02:00
|
|
|
ui/dic_tools_widget.ui \
|
2010-05-15 14:13:35 +02:00
|
|
|
ui/dic_wizard_info_page.ui \
|
|
|
|
ui/dic_wizard_letters_def_page.ui \
|
2010-05-15 14:20:19 +02:00
|
|
|
ui/dic_wizard_conclusion_page.ui \
|
2010-09-12 17:27:38 +02:00
|
|
|
ui/bag_widget.ui \
|
2008-01-20 19:40:12 +01:00
|
|
|
ui/main_window.ui \
|
|
|
|
ui/new_game.ui \
|
2008-08-27 23:20:03 +02:00
|
|
|
ui/player_widget.ui \
|
2008-09-03 19:28:27 +02:00
|
|
|
ui/prefs_dialog.ui \
|
|
|
|
ui/training_widget.ui \
|
|
|
|
eliot.qrc \
|
2008-09-07 15:17:39 +02:00
|
|
|
$(RESOURCES) \
|
|
|
|
images/eliot.ico
|
2008-01-20 19:40:12 +01:00
|
|
|
|
2010-05-13 00:12:31 +02:00
|
|
|
eliot_SOURCES = \
|
|
|
|
qtcommon.h qtcommon.cpp \
|
|
|
|
coord_model.h coord_model.cpp \
|
2010-11-01 18:49:55 +01:00
|
|
|
tile_widget.cpp tile_widget.h \
|
2010-10-22 19:01:31 +02:00
|
|
|
tile_layout.cpp tile_layout.h \
|
2011-07-28 22:55:48 +02:00
|
|
|
custom_popup.cpp custom_popup.h \
|
2010-05-13 00:12:31 +02:00
|
|
|
bag_widget.cpp bag_widget.h \
|
2010-11-01 18:49:55 +01:00
|
|
|
bag_widget2.cpp bag_widget2.h \
|
2010-05-13 00:12:31 +02:00
|
|
|
dic_tools_widget.cpp dic_tools_widget.h \
|
|
|
|
new_game.cpp new_game.h \
|
|
|
|
score_widget.cpp score_widget.h \
|
2010-05-15 14:13:35 +02:00
|
|
|
dic_wizard.cpp dic_wizard.h \
|
2010-05-13 00:12:31 +02:00
|
|
|
board_widget.cpp board_widget.h \
|
|
|
|
history_widget.cpp history_widget.h \
|
|
|
|
play_word_mediator.cpp play_word_mediator.h \
|
|
|
|
training_widget.cpp training_widget.h \
|
|
|
|
player_widget.cpp player_widget.h \
|
|
|
|
prefs_dialog.cpp prefs_dialog.h \
|
|
|
|
aux_window.cpp aux_window.h \
|
|
|
|
main_window.cpp main_window.h \
|
|
|
|
main.cpp
|
|
|
|
|
|
|
|
nodist_eliot_SOURCES = \
|
2008-01-20 19:40:12 +01:00
|
|
|
ui/main_window.ui.h \
|
2010-09-12 17:27:38 +02:00
|
|
|
ui/bag_widget.ui.h \
|
2008-01-20 19:40:12 +01:00
|
|
|
ui/new_game.ui.h \
|
|
|
|
ui/player_widget.ui.h \
|
2008-01-24 21:18:00 +01:00
|
|
|
ui/training_widget.ui.h \
|
2008-01-25 19:42:59 +01:00
|
|
|
ui/prefs_dialog.ui.h \
|
2008-08-27 23:20:03 +02:00
|
|
|
ui/dic_tools_widget.ui.h \
|
2010-05-15 14:13:35 +02:00
|
|
|
ui/dic_wizard_info_page.ui.h \
|
|
|
|
ui/dic_wizard_letters_def_page.ui.h \
|
2010-05-15 14:20:19 +02:00
|
|
|
ui/dic_wizard_conclusion_page.ui.h \
|
2009-02-19 19:25:17 +01:00
|
|
|
coord_model.moc.cpp \
|
2010-11-01 18:49:55 +01:00
|
|
|
tile_widget.moc.cpp \
|
2010-10-22 19:01:31 +02:00
|
|
|
tile_layout.moc.cpp \
|
2011-07-28 22:55:48 +02:00
|
|
|
custom_popup.moc.cpp \
|
2008-01-20 19:40:12 +01:00
|
|
|
new_game.moc.cpp \
|
2008-08-27 23:20:03 +02:00
|
|
|
dic_tools_widget.moc.cpp \
|
2008-01-20 19:40:12 +01:00
|
|
|
bag_widget.moc.cpp \
|
2010-11-01 18:49:55 +01:00
|
|
|
bag_widget2.moc.cpp \
|
2008-01-20 19:40:12 +01:00
|
|
|
score_widget.moc.cpp \
|
2010-05-15 14:13:35 +02:00
|
|
|
dic_wizard.moc.cpp \
|
2008-01-20 19:40:12 +01:00
|
|
|
board_widget.moc.cpp \
|
|
|
|
history_widget.moc.cpp \
|
2009-02-19 19:25:17 +01:00
|
|
|
play_word_mediator.moc.cpp \
|
2008-01-24 21:18:00 +01:00
|
|
|
player_widget.moc.cpp \
|
|
|
|
training_widget.moc.cpp \
|
2008-01-25 19:42:59 +01:00
|
|
|
prefs_dialog.moc.cpp \
|
2008-01-20 19:40:12 +01:00
|
|
|
aux_window.moc.cpp \
|
2008-09-03 19:28:27 +02:00
|
|
|
main_window.moc.cpp \
|
|
|
|
resources.cpp
|
2008-01-20 19:40:12 +01:00
|
|
|
|
2010-05-13 00:12:31 +02:00
|
|
|
BUILT_SOURCES = $(nodist_eliot_SOURCES)
|
|
|
|
|
|
|
|
MOSTLYCLEANFILES = $(nodist_eliot_SOURCES)
|
2008-01-20 19:40:12 +01:00
|
|
|
|
2009-12-06 01:10:29 +01:00
|
|
|
eliot_LDADD = ../game/libgame.a ../dic/libdic.a @QT_LIBS@ @LIBINTL@ @LIBCONFIG_LIBS@ @ARABICA_LIBS@ @EXPAT_LDFLAGS@
|
2010-10-17 23:23:39 +02:00
|
|
|
# Needed for proper stack trace handling
|
|
|
|
eliot_LDFLAGS = -rdynamic
|
2008-01-20 19:40:12 +01:00
|
|
|
|
2011-01-16 22:30:30 +01:00
|
|
|
if WITH_LOGGING
|
|
|
|
eliot_LDADD += @LOG4CXX_LIBS@
|
|
|
|
endif
|
|
|
|
|
2008-09-03 19:28:27 +02:00
|
|
|
# Generate a cpp file from the resources
|
|
|
|
resources.cpp: eliot.qrc $(RESOURCES)
|
|
|
|
$(RCC) -o $@ $<
|
|
|
|
|
2008-01-20 19:40:12 +01:00
|
|
|
# Generate the implementation file from the header
|
|
|
|
%.moc.cpp: %.h
|
|
|
|
$(MOC) -o $@ $<
|
|
|
|
|
|
|
|
# Generate the header from the .ui file
|
|
|
|
# We want to translate the string with gettext, not Qt own way
|
|
|
|
%.ui.h: %.ui
|
|
|
|
mkdir -p ui
|
|
|
|
rm -f $@ $@.tmp
|
|
|
|
echo "// Note: Lines below generated by Eliot build system" > $@.tmp
|
|
|
|
echo "#include \"qtcommon.h\"" >> $@.tmp
|
2010-02-07 18:34:34 +01:00
|
|
|
echo "#define Q_(a,b) _q(a)" >> $@.tmp
|
2008-01-20 19:40:12 +01:00
|
|
|
$(UIC) -tr "Q_" $< >> $@.tmp
|
|
|
|
sed 's/Q_(\"_(\\\"\(.*\)\\\")"/Q_("\1"/' $@.tmp >$@
|
|
|
|
rm -f $@.tmp
|
|
|
|
|
2008-09-07 15:17:39 +02:00
|
|
|
# Embed the icon in the win32 binary, see http://doc.trolltech.com/4.4/appicon.html
|
|
|
|
if WIN32_BUILD
|
|
|
|
BUILT_SOURCES += win32icon.rc
|
|
|
|
eliot_SOURCES += win32icon.rc
|
|
|
|
eliot_LDADD += win32icon.o
|
|
|
|
|
|
|
|
win32icon.o: win32icon.rc
|
|
|
|
i586-mingw32msvc-windres -o $@ -i $<
|
|
|
|
endif
|
2008-01-20 19:40:12 +01:00
|
|
|
|
2008-09-22 23:21:38 +02:00
|
|
|
# This target is out of the conditional, so that make distcheck is happy
|
|
|
|
win32icon.rc: images/eliot.ico
|
|
|
|
echo "IDI_ICON1 ICON DISCARDABLE \"$(top_srcdir)/qt/images/eliot.ico\"" > $@
|
|
|
|
|
2008-01-20 19:40:12 +01:00
|
|
|
endif
|
|
|
|
|