all: release

clean: clean_release

valgrind: MAKETARGET = valgrind
valgrind: makework

clean_valgrind: MAKETARGET = valgrind
clean_valgrind: makeclean

debug: MAKETARGET = debug
debug: makework

clean_debug: MAKETARGET = debug
clean_debug: makeclean

release: MAKETARGET = release
release: makework

clean_release: MAKETARGET = release
clean_release: makeclean

nosound: MAKETARGET = release_nosound
nosound: makework

clean_nosound: MAKETARGET = release_nosound
clean_nosound: makeclean

debug_nosound: MAKETARGET = debug_nosound
debug_nosound: makework

clean_debug_nosound: MAKETARGET = debug_nosound
clean_debug_nosound: makeclean

editor: MAKETARGET = editor
editor: makework

clean_editor: MAKETARGET = editor
clean_editor: makeclean

editor_nosound: MAKETARGET = editor_nosound
editor_nosound: makework

clean_editor_nosound: MAKETARGET = editor_nosound
clean_editor_nosound: makeclean

test: 
	$(MAKE) -f iichantra.mk test TARGET=debug
	
run_test:
	$(MAKE) -f iichantra.mk run_test TARGET=debug

clean_test: 
	$(MAKE) -f iichantra.mk clean_test TARGET=debug

makework : 
	$(MAKE) -f iichantra.mk TARGET=$(MAKETARGET)

makeclean:
	$(MAKE) -f iichantra.mk clean TARGET=$(MAKETARGET)
	
distclean:
	$(MAKE) -f iichantra.mk distclean

.PHONY: all clean valgrind clean_valgrind debug clean_debug release clean_release nosound clean_nosound debug_nosound clean_debug_nosound editor clean_editor editor_nosound clean_editor_nosound test clean_test makework makeclean distclean
