-# Copyright (C) 2009 Nick Bowler
-# Copying and distribution of this file, with or without modification,
-# are permitted in any medium without royalty provided the copyright
-# notice and this notice are preserved. This file is offered as-is,
-# without any warranty.
+# Copyright © 2009-2011 Nick Bowler
+#
+# License WTFPL2: Do What The Fuck You Want To Public License, version 2.
+# This is free software: you are free to do what the fuck you want to.
+# There is NO WARRANTY, to the extent permitted by law.
-noinst_HEADERS += engine/music.h engine/texture.h engine/music-module.h
+noinst_HEADERS += engine/music-module.h
+
+engine_GOBS = engine/palette.gob engine/texture.gob engine/music.gob
+
+EXTRA_DIST += $(engine_GOBS) $(engine_GOBS:.gob=.gobstamp)
+noinst_HEADERS += $(engine_GOBS:.gob=.h)
+MAINTAINERCLEANFILES += $(engine_GOBS:.gob=.gobstamp) \
+ $(engine_GOBS:.gob=.c) $(engine_GOBS:.gob=.h)
pkglib_LTLIBRARIES += engine.la
-engine_la_SOURCES = engine/music.c engine/texture.c engine/engine.c
+engine_la_SOURCES = engine/engine.c $(engine_GOBS:.gob=.c)
engine_la_CFLAGS = $(GLIB_CFLAGS)
engine_la_LIBADD = $(GLIB_LIBS)
engine_la_LDFLAGS = -module -avoid-version -export-symbols-regex _LTX_
+# Force all GOB objects to be generated before building anything.
+$(engine_la_OBJECTS): $(orderonly) $(engine_GOBS:.gob=.gobstamp)
+
if USE_DUMMYMOD
engine_la_SOURCES += engine/music-dummymod.c
endif