File: Makefile.am

package info (click to toggle)
xmahjongg 3.5-2
  • links: PTS
  • area: main
  • in suites: woody
  • size: 1,060 kB
  • ctags: 1,317
  • sloc: cpp: 5,619; ansic: 3,451; sh: 330; makefile: 162
file content (167 lines) | stat: -rw-r--r-- 4,835 bytes parent folder | download
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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
## Process this file with automake to produce Makefile.in
AUTOMAKE_OPTIONS = no-dependencies foreign check-news

bin_PROGRAMS = xmahjongg
noinst_PROGRAMS = giftoc
man_MANS = xmahjongg.6

xmahjongg_SOURCES = clp.h clp.c fmalloc.c \
		gif.h giffunc.c gifread.c gifx.h gifx.c \
		permstr.hh permstr.cc \
		vectori.cc \
		alarm.hh alarm.cc \
		board.hh board.cc \
		button.hh button.cc \
		counter.hh counter.cc \
		game.hh game.cc \
		gmjts.hh gmjts.cc \
		hint.hh hint.cc \
		kdets.hh kdets.cc \
		kmjts.hh kmjts.cc \
		main.cc \
		matches.hh matches.cc \
		moment.hh moment.cc \
		panel.hh panel.cc \
		random.cc \
		solution.hh solution.cc \
		solvable.hh solvable.cc \
		swgeneral.hh swgeneral.cc \
		swwidget.hh swwidget.cc \
		tile.hh tile.cc \
		tileset.hh tileset.cc \
		traverse.hh traverse.cc \
		xmj3ts.hh xmj3ts.cc

giftoc_SOURCES = giftoc.c
BUILT_SOURCES = images.c

INCLUDES = $(X_CFLAGS)

LDADD = @LIBOBJS@
xmahjongg_LDADD = images.o $(LDADD) @X_LIBS@ @X_PRE_LIBS@ -lX11 @X_EXTRA_LIBS@


#
# Dependencies
#

xmahjongg_DEPENDENCIES = @LIBOBJS@ images.o
giftoc_DEPENDENCIES = @LIBOBJS@

AUTODEPENDENCIES =
@AUTODEPENDENCIES@

clp.o: clp.c clp.h
vectori.o: vectori.cc vector.cc vector.hh
permstr.o: permstr.cc permstr.hh

giffunc.o: giffunc.c
gifread.o: gifread.c
gifx.o: gifx.c gifx.h

moment.o: moment.cc moment.hh
alarm.o: alarm.cc alarm.hh moment.hh
random.o: random.cc

tile.o: tile.cc tile.hh
tileset.o: tileset.cc tileset.hh
xmj3ts.o: xmj3ts.cc xmj3ts.hh tileset.hh
gmjts.o: gmjts.cc gmjts.hh tileset.hh
kmjts.o: kmjts.cc kmjts.hh tileset.hh
kdets.o: kdets.cc kdets.hh tileset.hh

swgeneral.o: swgeneral.cc swgeneral.hh
swwidget.o: swwidget.cc swwidget.hh

game.o: game.cc game.hh
solvable.o: solvable.cc solvable.hh
board.o: board.cc board.hh swwidget.hh

button.o: button.cc button.hh swwidget.hh alarm.hh
hint.o: hint.cc hint.hh alarm.hh
traverse.o: traverse.cc traverse.hh alarm.hh
matches.o: matches.cc matches.hh swwidget.hh game.hh
counter.o: counter.cc counter.hh swwidget.hh game.hh
solution.o: solution.cc solution.hh alarm.hh

panel.o: panel.cc panel.hh swgeneral.hh

main.o: main.cc config.h

IMAGES = images/buttons.gif images/digits.gif
MOSTLYCLEANFILES = images.c
images.c: $(IMAGES) giftoc
	./giftoc -extern -makename -dir $(srcdir) $(IMAGES) > $@


#
# Installation
#

LAYOUTS	= default bridge wedges ceremonial farandole arena theater \
	deepwell hourglass arrow papillon
TILESETS = thin.gif small.gif thick.gif gnome.gif gnome2.gif dorothys.gif \
	dorwhite.gif real.gif
BACKGROUNDS = default.gif green.gif

install-share:
	$(mkinstalldirs) $(pkgdatadir)/layouts $(pkgdatadir)/tiles $(pkgdatadir)/backgrounds
	for i in $(LAYOUTS); do \
	$(INSTALL_DATA) $(srcdir)/share/layouts/$$i $(pkgdatadir)/layouts; done
	for i in $(TILESETS); do \
	$(INSTALL_DATA) $(srcdir)/share/tiles/$$i $(pkgdatadir)/tiles; done
	for i in $(BACKGROUNDS); do \
	$(INSTALL_DATA) $(srcdir)/share/backgrounds/$$i $(pkgdatadir)/backgrounds; done
install-data-local: install-share

uninstall-local:
	-cd $(pkgdatadir)/layouts; rm -f $(LAYOUTS)
	-cd $(pkgdatadir)/tiles; rm -f $(TILESETS)
	-cd $(pkgdatadir)/backgrounds; rm -f $(BACKGROUNDS)
	-rmdir $(pkgdatadir)/layouts $(pkgdatadir)/tiles $(pkgdatadir)/backgrounds
	-rmdir $(pkgdatadir)


#
# Distribution
#

EXTRA_DIST = vector.cc vector.hh xmahjongg.6 rpm.spec

dist-hook:
	@mkdir $(distdir)/share $(distdir)/images
	@mkdir $(distdir)/share/layouts $(distdir)/share/tiles $(distdir)/share/backgrounds
	@d=`cd $(distdir)/share/layouts; pwd` && cd $(srcdir)/share/layouts && cp -p $(LAYOUTS) $$d
	@d=`cd $(distdir)/share/tiles; pwd` && cd $(srcdir)/share/tiles && cp -p $(TILESETS) $$d
	@d=`cd $(distdir)/share/backgrounds; pwd` && cd $(srcdir)/share/backgrounds && cp -p $(BACKGROUNDS) $$d
	@cp -p $(srcdir)/images/*.gif $(distdir)/images

rpm: dist
	buildarch=`rpm --showrc | awk '/^build arch/ { print $$4; }'` ; \
	mkdir -p /tmp/rpm-xmj/SOURCES /tmp/rpm-xmj/RPMS/$$buildarch \
	/tmp/rpm-xmj/BUILD ; \
	echo 'include: /usr/lib/rpm/rpmrc' > /tmp/rpm-xmj/rc ; \
	echo 'macrofiles: /usr/lib/rpm/macros:/tmp/rpm-xmj/macros' >> /tmp/rpm-xmj/rc ; \
	echo '%_topdir /tmp/rpm-xmj' > /tmp/rpm-xmj/macros ; \
	cp logo.gif $(PACKAGE)-$(VERSION).tar.gz /tmp/rpm-xmj/SOURCES ; \
	rpm --rcfile /tmp/rpm-xmj/rc -bb rpm.spec ; \
	cp /tmp/rpm-xmj/RPMS/$$buildarch/*.rpm .
	rm -rf /tmp/rpm-xmj


#
# Maintenance
#

srclinks:
	for i in clp.h clp.c fmalloc.c permstr.hh permstr.cc strerror.c \
	vector.hh vector.cc ; do \
	ln -sf $$HOME/src/edlib/$$i $$i ; done
	for i in gif.h giffunc.c gifread.c giftoc.c gifx.h gifx.c ; do \
	ln -sf $$HOME/src/giflib/$$i $$i ; done

versionize:
	perl -pi -e "s/^\\.ds V.*/.ds V $(VERSION)/;" xmahjongg.6
	perl -pi -e "s/^Version: .*/Version: $(VERSION)/; s/$(PACKAGE)-[\w.]+\.tar\.gz/$(PACKAGE)-$(VERSION).tar.gz/;" rpm.spec

.PHONY: srclinks versionize rpm