summaryrefslogtreecommitdiffstats
path: root/kreversi/Makefile.am
blob: 446ac5c433b367d8fab4dc6e8f5ef991880b5018 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
INCLUDES = -I$(top_srcdir)/libtdegames -I$(top_srcdir)/libtdegames/highscore $(all_includes)

bin_PROGRAMS = kreversi

kreversi_SOURCES = \
    kzoommainwindow.cpp \
    Score.cpp \
    Move.cpp \
    Position.cpp \
    Game.cpp \
    qreversigame.cpp \
    qreversigameview.cpp \
    SuperEngine.cpp \
    Engine.cpp \
    board.cpp \
    settings.ui \
    highscores.cpp \
    kreversi.cpp \
    main.cpp \
    prefs.kcfgc
kreversi_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_TQT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_TDEIO) -ltdetexteditor
kreversi_LDADD = $(LIB_TDEGAMES) $(LIB_TDEIO)
kreversi_DEPENDENCIES = $(LIB_TDEGAMES_DEP)

METASOURCES = AUTO

rcdir = $(kde_datadir)/kreversi
rc_DATA = kreversiui.rc

noinst_HEADERS = \
    kzoommainwindow.h \
    Engine.h \
    Game.h \
    qreversigame.h \
    qreversigameview.h \
    kreversi.h \
    Move.h \
    board.h \
    Position.h \
    Score.h \
    version.h \
    SuperEngine.h \
    highscores.h

SUBDIRS = . pics sounds icons

xdg_apps_DATA = kreversi.desktop
kde_kcfg_DATA = kreversi.kcfg


messages: rc.cpp
	$(XGETTEXT) *.cpp -o $(podir)/kreversi.pot

# for system-wide highscore file
DESTBIN = $(DESTDIR)$(bindir)/$(bin_PROGRAMS)
DESTHIGHSCORES = $(DESTDIR)$(HIGHSCORE_DIRECTORY)
DESTSCORES = $(DESTDIR)$(HIGHSCORE_DIRECTORY)/$(bin_PROGRAMS).scores

install-data-local:
	@if test x$(HIGHSCORE_DIRECTORY) != x; then \
	  echo "********************************************************" ;\
	  echo "" ;\
	  echo "This game is installed sgid \"games\" to use the" ;\
	  echo "system-wide highscore file (in "$(HIGHSCORE_DIRECTORY)")." ;\
	  echo "" ;\
	  echo "If the system-wide highscore file does not exist, it is" ;\
          echo "created with the correct ownership and permissions. See the" ;\
          echo "INSTALL file in \"tdegames/libtdegames/highscore\" for details." ;\
	  echo "" ;\
	  echo "********************************************************" ;\
	fi 

install-exec-hook:
	@if test x$(HIGHSCORE_DIRECTORY) != x; then \
	  chown $(highscore_user):$(highscore_group) $(DESTBIN) \
	  || echo "Error: Could not install the game with correct permissions !!" ;\
	fi

	@if test x$(HIGHSCORE_DIRECTORY) != x; then \
		mkdir -p $(DESTHIGHSCORES) && \
		chown $(highscore_user):$(highscore_group) $(DESTHIGHSCORES) \
		&& chmod 750 $(DESTHIGHSCORES) \
	        || echo "Error: Could not create the highscore directory with correct permissions !!" ;\
	fi

	@if test x$(HIGHSCORE_DIRECTORY) != x; then \
	   chown $(highscore_user):$(highscore_group) $(DESTBIN) \
	   || echo "Error: Could not install the game with correct permissions !!" ;\
	fi

	@if test ${setgid} = true; then \
	   chmod 2755  $(DESTBIN) \
	   || echo "Error: Could not install the game with correct permissions !!" ;\
	fi

	@if test x$(HIGHSCORE_DIRECTORY) != x; then \
	   touch $(DESTSCORES) && chown $(highscore_user):$(highscore_group) $(DESTSCORES) \
	   && chmod 0660 $(DESTSCORES) \
	   || echo "Error: Could not create system-wide highscore file with correct permissions !!" ;\
	fi