## FLXLab v2.5 - A program for running psychology experiments.  
## Copyright (C) 2010 Todd R. Haskell (todd.haskell@wwu.edu) 
## 
## Use and distribution is governed by the terms of the 
## GNU General Public License. Certain portions of the 
## program may be subject to other licenses as well. See 
## the file LICENSE.TXT for details.
## 

FLXMAKEFILEGLOBAL=TRUE

include Makefile.system

FLXLABCOMPONENTS=allegro jpgalleg agup glyphkeeper base mod_graphics mod_text mod_gui mod_startscreen
# for now, we only build the sound modules for linux and windows
ifeq ($(FLXLABOS),linux)
	FLXLABCOMPONENTS += portaudio mod_sounddriver mod_sound
endif
ifeq ($(FLXLABOS),windows)
	FLXLABCOMPONENTS += portaudio mod_sounddriver mod_sound
endif

build install.sub clean tilde_clean.sub:
	for COMPONENT in $(FLXLABCOMPONENTS); do cd $$COMPONENT; make $(basename $@); cd ..; done

preinstall:
	mkdir -p $(FLXLABVERSIONDIR)
	mkdir -p $(FLXLABLICENSEDIR)	
	mkdir -p $(FLXLABCONFIGDIR)
	mkdir -p $(FLXLABMODULEDIR)
	mkdir -p $(FLXLABRESOURCEDIR)

install: preinstall install.sub
	cp LICENSE.TXT $(FLXLABLICENSEDIR)

uninstall:
	rm -fr $(FLXLABVERSIONDIR)

tilde_clean: tilde_clean.sub
	rm -fr *~

