-bin_PROGRAMS = yoink
+noinst_LTLIBRARIES = libmoof.la
-yoink_SOURCES = yoink.cc
-yoink_LDFLAGS = -lstdc++
+libmoof_la_SOURCES = \
+ Moof/Aabb.hh \
+ Moof/Animation.cc \
+ Moof/Animation.hh \
+ Moof/ConvertUTF.c \
+ Moof/ConvertUTF.h \
+ Moof/Deserializer.cc \
+ Moof/Deserializer.hh \
+ Moof/Dispatcher.cc \
+ Moof/Dispatcher.hh \
+ Moof/Drawable.hh \
+ Moof/Engine.cc \
+ Moof/Engine.hh \
+ Moof/Event.hh \
+ Moof/Interpolator.hh \
+ Moof/Math.hh \
+ Moof/Mippleton.hh \
+ Moof/OpenGL.hh \
+ Moof/Profiler.hh \
+ Moof/Random.cc \
+ Moof/Random.hh \
+ Moof/Resource.cc \
+ Moof/Resource.hh \
+ Moof/Scene.cc \
+ Moof/Scene.hh \
+ Moof/Serializable.cc \
+ Moof/Serializable.hh \
+ Moof/Serializer.cc \
+ Moof/Serializer.hh \
+ Moof/Settings.cc \
+ Moof/Settings.hh \
+ Moof/Singleton.hh \
+ Moof/StringTools.cc \
+ Moof/StringTools.hh \
+ Moof/Texture.cc \
+ Moof/Texture.hh \
+ Moof/Thread.hh \
+ Moof/Tilemap.cc \
+ Moof/Tilemap.hh \
+ Moof/Timer.cc \
+ Moof/Timer.hh \
+ Moof/Video.cc \
+ Moof/Video.hh \
+ Moof/fastevents.c \
+ Moof/fastevents.h \
+ $(ENDLIST)
+
+libmoof_la_CPPFLAGS = -I$(top_srcdir)/src/Moof -I$(top_srcdir)/yajl/src
+libmoof_la_LIBADD = $(top_srcdir)/yajl/libyajl.la
+
+
+bin_PROGRAMS = yoink
+
+yoink_SOURCES = \
+ Character.cc \
+ Character.hh \
+ TilemapFont.cc \
+ TilemapFont.hh \
+ Typesetter.cc \
+ Typesetter.hh \
+ YoinkApp.cc \
+ YoinkApp.hh \
+ $(ENDLIST)
+
+yoink_CPPFLAGS = -I$(top_srcdir)/src/Moof
+yoink_LDADD = libmoof.la
+
+
+EXTRA_DIST = Moof/cml
+
+
+YOINK_ENVIRONMENT = YOINK_DATADIR="$(top_srcdir)/data" \
+ YOINKRC="$(top_srcdir)/data/yoinkrc"
+
+run: all
+ $(YOINK_ENVIRONMENT) ./yoink
+
+debug: all
+ $(YOINK_ENVIRONMENT) gdb ./yoink