summaryrefslogtreecommitdiff
path: root/Makefile.am
blob: 0bfe2da6dade5e43cae1a710e5b2a56288f889d6 (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
# Handle substitution of fully-expanded Autoconf variables.
do_subst = $(SED)					\
  -e 's,[@]GUILE[@],$(GUILE),g'				\
  -e 's,[@]guilemodulepath[@],$(guilemodulepath),g'	\
  -e 's,[@]guileobjectpath[@],$(guileobjectpath),g'	\
  -e 's,[@]datadir[@],$(datadir),g'

scripts/super-bloom: scripts/super-bloom.in Makefile
	$(AM_V_at)rm -f $@ $@-t
	$(AM_V_at)$(MKDIR_P) "$(@D)"
	$(AM_V_GEN)$(do_subst) < "$(srcdir)/$@.in" > "$@-t"
	$(AM_V_at)chmod a+x,a-w "$@-t" && mv -f "$@-t" "$@"

super-bloom/config.scm: super-bloom/config.scm.in Makefile
	$(AM_V_at)rm -f $@ $@-t
	$(AM_V_at)$(MKDIR_P) "$(@D)"
	$(AM_V_GEN)$(do_subst) < "$(srcdir)/$@.in" > "$@-t"
	$(AM_V_at)chmod a-w "$@-t" && mv -f "$@-t" "$@"

GOBJECTS = $(SOURCES:%.scm=%.go)
nobase_mod_DATA = $(SOURCES)
nobase_go_DATA = $(GOBJECTS)

# Make sure source files are installed first, so that the mtime of
# installed compiled files is greater than that of installed source
# files.  See
# <http://lists.gnu.org/archive/html/guile-devel/2010-07/msg00125.html>
# for details.
guile_install_go_files = install-nobase_goDATA
$(guile_install_go_files): install-nobase_modDATA

CLEANFILES = $(GOBJECTS)
GUILE_WARNINGS = -Wunbound-variable -Warity-mismatch -Wformat
SUFFIXES = .scm .go
.scm.go:
	$(AM_V_GEN)$(top_builddir)/pre-inst-env $(GUILE_TOOLS) compile $(GUILE_WARNINGS) -o "$@" "$<"

moddir=$(prefix)/share/guile/site/$(GUILE_EFFECTIVE_VERSION)
godir=$(libdir)/guile/$(GUILE_EFFECTIVE_VERSION)/site-ccache

SOURCES = 					\
  super-bloom/config.scm			\
  super-bloom/common.scm			\
  super-bloom/actor.scm				\
  super-bloom/water.scm				\
  super-bloom/flower.scm			\
  super-bloom/dirt-ball.scm			\
  super-bloom/player.scm			\
  super-bloom/game.scm				\
  super-bloom/splash.scm			\
  super-bloom/main.scm

bin_SCRIPTS =					\
  scripts/super-bloom

audiodir = $(pkgdatadir)/audio
dist_audio_DATA =				\
  assets/audio/absorb.wav			\
  assets/audio/explosion.wav			\
  assets/audio/spray.wav			\
  assets/audio/watered.wav

fontsdir = $(pkgdatadir)/fonts
dist_fonts_DATA =				\
  assets/fonts/monogram_extended.ttf

imagesdir = $(pkgdatadir)/images
dist_images_DATA =				\
  assets/images/background.png			\
  assets/images/chickadee.png			\
  assets/images/dirt-ball.png			\
  assets/images/explosion-particle.png		\
  assets/images/flower.png			\
  assets/images/player.png			\
  assets/images/trail-particle.png		\
  assets/images/water.png			\
  assets/images/water-particle.png

EXTRA_DIST = 					\
  COPYING					\
  README.md					\
  guix.scm