INCLUDES=-DTEXTURE_DIR=\""$(pkgdatadir)/textures"\" \
	 -DFONT_DIR=\""$(pkgdatadir)/fonts"\" \
	 -DMODEL_DIR=\""$(pkgdatadir)/3dmodels"\" \
	 -DDATA_DIR=\""$(pkgdatadir)/data"\" \
	 -DCONF_DIR=\""$(pkgdatadir)/conf"\" \
	 -DEVENTS_DIR=\""$(pkgdatadir)/events"\" \
	 -DSHOTS_DIR=\""$(pkgdatadir)/scrshots"\"

bin_PROGRAMS = openuniverse

openuniverse_SOURCES = \
astrolib.cpp      gravity.cpp   lex.cfg.cpp   positions.cpp  texture.cpp \
bmf.h             gui.cpp       loadbmf.cpp   radar.cpp      texture.h \
camera.cpp        gui.h         macros.h      rings.cpp      timer.cpp \
cfgparse.tab.cpp  info.cpp      messier.cpp   scrnshot.cpp   util.cpp \
cfgparse.tab.h    init.cpp      milkyway.cpp  stars.cpp      events.cpp \
cmdline.cpp       joystick.cpp  mouse.cpp     sun.cpp 	     mp3.cpp \
comet.cpp         jpeg.cpp      ou.cpp        texfont.cpp  flares.cpp \
font.cpp          keyboard.cpp  ou.h          texfont.h glext.h

EXTRA_openuniverse_SOURCES = cfgparse.y cfglex.l vsop87.dat Makefile.X11

lex.cfg.cpp: cfglex.l cfgparse.tab.cpp
	${LEX} -i -Pcfg cfglex.l
	mv lex.cfg.c lex.cfg.cpp


cfgparse.tab.cpp: cfgparse.y
	${YACC} -d -v -p cfg cfgparse.y
	mv y.tab.c cfgparse.tab.cpp
	mv y.tab.h cfgparse.tab.h

cfgparse.tab.h: cfgparse.tab.cpp
