#
# Common toplevel makefile targets for TKS and plugins
#
#  This file gets included by makefile.[msvc | mingw | linux | macosx]
#
#  MKFILE, PLUGINS and TKS_ZIP_PREFIX must be defined before including this file.
#
#

#
# help
#
help:
	@echo "         all_clean : Clean tks and plugin targets"
	@echo "           all_bin : Build tks and plugin targets"
	@echo "           all_upx : Compress all executables and DLLs using UPX"
	@echo "       all_install : Install tks and plugin targets"
	@echo "           all_zip : Create source distribution packages (.zip) in directory \"$(TKS_ZIP_PREFIX)\""
	@echo " "
	@echo "           tks_bin : Build tks binary"
	@echo "       plugins_bin : Build plugins"
	@echo "     plugins_clean : Remove targets and intermediate build files"
	@echo "       plugins_zip : Create plugin source distribution packages (.zip) in directory \"$(TKS_ZIP_PREFIX)\""
	@echo "        plugins_ee : Export plugin documentation (in DOG format)"
	@echo "       plugins_yac : (Re-)build YAC interface files";
	@echo " "


#
# all targets
#
.PHONY: all
all: tks plugins

.PHONY: all_clean
all_clean: tks_clean yac_clean plugins_clean

.PHONY: all_bin
all_bin: tks_bin plugins_bin

.PHONY: all_upx
all_upx: tks_upx plugins_upx

.PHONY: all_install
all_install: tks_install plugins_install

.PHONY: all_zip
all_zip: tks_zip tks_build_zip yac_zip plugins_zip all_tsl_zip all_app_zip all_examples_zip


#
# plugin targets
#
.PHONY: plugins
plugins: $(subst __,,$(PLUGINS))

.PHONY: plugins_clean
plugins_clean: $(subst __,_clean,$(PLUGINS))

.PHONY: plugins_bin
plugins_bin: $(subst __,_bin,$(PLUGINS))

.PHONY: plugins_upx
plugins_upx: $(subst __,_upx,$(PLUGINS))

.PHONY: plugins_install
plugins_install: $(subst __,_install,$(PLUGINS))

.PHONY: plugins_ee
plugins_ee: $(subst __,_ee,$(PLUGINS))

.PHONY: plugins_yac
plugins_yac: $(subst __,_yac,$(PLUGINS))

.PHONY: plugins_zip
plugins_zip: $(subst __,_zip,$(PLUGINS))



#
# yac (use Cygwin shell!)
#
.PHONY: yac_clean
yac_clean:
	$(RM) -fr `find yac -name \*~`

yac_zip:
	$(RM) "$(TKS_ZIP_PREFIX)/yac.zip" ; zip -r -9 "$(TKS_ZIP_PREFIX)/yac.zip" yac

#
# Create snapshot of build environment
#
ALL_MAKEFILES= makefile.common makefile.linux makefile.mingw makefile.msvc
ALL_MKINCLUDES= install_linux.mk install_mingw.mk install_msvc.mk plugin_common.mk plugin_common_gcc.mk plugin_linux.mk plugin_mingw.mk plugin_msvc.mk

tks_build_zip:
	$(RM) "$(TKS_ZIP_PREFIX)/tks-build.zip" ; zip -r -9 "$(TKS_ZIP_PREFIX)/tks-build.zip" $(ALL_MAKEFILES) $(ALL_MKINCLUDES)


#
# Example source packages 
#  (more examples can be found in the plugin packages) 
#
all_examples_zip: tks_examples_zip gkraft_zip retrovaders2_zip equalize_it_zip 

tks_examples_zip:
	$(RM) "$(TKS_ZIP_PREFIX)/tks-examples.zip" ; zip -r -9 "$(TKS_ZIP_PREFIX)/tks-examples.zip" tks-examples/

gkraft_zip:
	$(RM) "$(TKS_ZIP_PREFIX)/gkraft.zip" ; zip -r -9 "$(TKS_ZIP_PREFIX)/gkraft.zip" tks-projects/gkraft

retrovaders2_zip:
	$(RM) "$(TKS_ZIP_PREFIX)/retrovaders2.zip" ; zip -r -9 "$(TKS_ZIP_PREFIX)/retrovaders2.zip" tks-projects/retrovaders2

equalize_it_zip:
	$(RM) "$(TKS_ZIP_PREFIX)/equalize_it.zip" ; zip -r -9 "$(TKS_ZIP_PREFIX)/equalize_it.zip" tks-projects/equalize_it_dev


#
# Script libraries
#
all_tsl_zip: debugtext_zip tkunit_zip 

debugtext_zip:
	$(RM) "$(TKS_ZIP_PREFIX)/debugtext.zip" ; zip -r -9 "$(TKS_ZIP_PREFIX)/debugtext.zip" tks-projects/debugtext/

tkunit_zip:
	$(RM) "$(TKS_ZIP_PREFIX)/tkunit.zip" ; zip -r -9 "$(TKS_ZIP_PREFIX)/tkunit.zip" tkunit/


#
# Script applications
#
all_app_zip: dog_zip rio_zip

dog_zip:
	$(RM) "$(TKS_ZIP_PREFIX)/dog.zip" ; zip -r -9 "$(TKS_ZIP_PREFIX)/dog.zip" dog/

rio_zip:
	$(RM) "$(TKS_ZIP_PREFIX)/rio.zip" ; zip -r -9 "$(TKS_ZIP_PREFIX)/rio.zip" tks-projects/rio/



#
# tks
#
.PHONY: tks
tks:
	$(MAKE) -j $(NUMJOBS) -C tks-source -f $(MKFILE) realclean ; $(MAKE) -j $(NUMJOBS) -C tks-source -f $(MKFILE) bin

tks_clean:
	$(MAKE) -j $(NUMJOBS) -C tks-source -f $(MKFILE) realclean

tks_bin:
	$(MAKE) -j $(NUMJOBS) -C tks-source -f $(MKFILE) bin

tks_upx:
	$(MAKE) -j $(NUMJOBS) -C tks-source -f $(MKFILE) upx

tks_install:
	$(MAKE) -j $(NUMJOBS) -C tks-source -f $(MKFILE) install

tks_ee:
	$(MAKE) -j $(NUMJOBS) -C tks-source -f $(MKFILE) ee

tks_zip:
	$(RM) "$(TKS_ZIP_PREFIX)/tks-source.zip" ; zip -r -9 "$(TKS_ZIP_PREFIX)/tks-source.zip" tks-source


#
# yingtest
#
.PHONY: yingtest
yingtest:
	$(MAKE) -j $(NUMJOBS) -C yingtest -f $(MKFILE) realclean ; $(MAKE) -j $(NUMJOBS) -C yingtest -f $(MKFILE) bin

yingtest_clean:
	$(MAKE) -j $(NUMJOBS) -C yingtest -f $(MKFILE) realclean

yingtest_bin:
	$(MAKE) -j $(NUMJOBS) -C yingtest -f $(MKFILE) bin

yingtest_upx:
	$(MAKE) -j $(NUMJOBS) -C yingtest -f $(MKFILE) upx

yingtest_install:
	$(MAKE) -j $(NUMJOBS) -C yingtest -f $(MKFILE) install

yingtest_ee:
	$(MAKE) -j $(NUMJOBS) -C yingtest -f $(MKFILE) ee

yingtest_yac:
	$(MAKE) -j $(NUMJOBS) -C yingtest -f $(MKFILE) yac

yingtest_zip:
	$(RM) "$(TKS_ZIP_PREFIX)/yingtest.zip" ; zip -r -9 "$(TKS_ZIP_PREFIX)/yingtest.zip" yingtest


#
# tksdl
#
.PHONY: tksdl
tksdl:
	$(MAKE) -j $(NUMJOBS) -C tksdl -f $(MKFILE) realclean ; $(MAKE) -j $(NUMJOBS) -C tksdl -f $(MKFILE) bin

tksdl_clean:
	$(MAKE) -j $(NUMJOBS) -C tksdl -f $(MKFILE) realclean

tksdl_bin:
	$(MAKE) -j $(NUMJOBS) -C tksdl -f $(MKFILE) bin

tksdl_upx:
	$(MAKE) -j $(NUMJOBS) -C tksdl -f $(MKFILE) upx

tksdl_install:
	$(MAKE) -j $(NUMJOBS) -C tksdl -f $(MKFILE) install

tksdl_ee:
	$(MAKE) -j $(NUMJOBS) -C tksdl -f $(MKFILE) ee

tksdl_yac:
	$(MAKE) -j $(NUMJOBS) -C tksdl -f $(MKFILE) yac

tksdl_zip:
	$(RM) "$(TKS_ZIP_PREFIX)/tksdl.zip" ; zip -r -9 "$(TKS_ZIP_PREFIX)/tksdl.zip" tksdl


#
# tksdl_net
#
.PHONY: tksdl_net
tksdl_net:
	$(MAKE) -j $(NUMJOBS) -C tksdl_net -f $(MKFILE) realclean ; $(MAKE) -j $(NUMJOBS) -C tksdl_net -f $(MKFILE) bin

tksdl_net_clean:
	$(MAKE) -j $(NUMJOBS) -C tksdl_net -f $(MKFILE) realclean

tksdl_net_bin:
	$(MAKE) -j $(NUMJOBS) -C tksdl_net -f $(MKFILE) bin

tksdl_net_upx:
	$(MAKE) -j $(NUMJOBS) -C tksdl_net -f $(MKFILE) upx

tksdl_net_install:
	$(MAKE) -j $(NUMJOBS) -C tksdl_net -f $(MKFILE) install

tksdl_net_ee:
	$(MAKE) -j $(NUMJOBS) -C tksdl_net -f $(MKFILE) ee

tksdl_net_yac:
	$(MAKE) -j $(NUMJOBS) -C tksdl_net -f $(MKFILE) yac

tksdl_net_zip:
	$(RM) "$(TKS_ZIP_PREFIX)/tksdl_net.zip" ; zip -r -9 "$(TKS_ZIP_PREFIX)/tksdl_net.zip" tksdl_net


#
# tkopengl
#
.PHONY: tkopengl
tkopengl:
	$(MAKE) -j $(NUMJOBS) -C tkopengl -f $(MKFILE) realclean ; $(MAKE) -j $(NUMJOBS) -C tkopengl -f $(MKFILE) bin

tkopengl_clean:
	$(MAKE) -j $(NUMJOBS) -C tkopengl -f $(MKFILE) realclean

tkopengl_bin:
	$(MAKE) -j $(NUMJOBS) -C tkopengl -f $(MKFILE) bin

tkopengl_upx:
	$(MAKE) -j $(NUMJOBS) -C tkopengl -f $(MKFILE) upx

tkopengl_install:
	$(MAKE) -j $(NUMJOBS) -C tkopengl -f $(MKFILE) install

tkopengl_ee:
	$(MAKE) -j $(NUMJOBS) -C tkopengl -f $(MKFILE) ee

tkopengl_yac:
	$(MAKE) -j $(NUMJOBS) -C tkopengl -f $(MKFILE) yac

tkopengl_zip:
	$(RM) "$(TKS_ZIP_PREFIX)/tkopengl.zip" ; zip -r -9 "$(TKS_ZIP_PREFIX)/tkopengl.zip" tkopengl


#
# tkcg
#
.PHONY: tkcg
tkcg:
	$(MAKE) -j $(NUMJOBS) -C tkcg -f $(MKFILE) realclean ; $(MAKE) -j $(NUMJOBS) -C tkcg -f $(MKFILE) bin

tkcg_clean:
	$(MAKE) -j $(NUMJOBS) -C tkcg -f $(MKFILE) realclean

tkcg_bin:
	$(MAKE) -j $(NUMJOBS) -C tkcg -f $(MKFILE) bin

tkcg_upx:
	$(MAKE) -j $(NUMJOBS) -C tkcg -f $(MKFILE) upx

tkcg_install:
	$(MAKE) -j $(NUMJOBS) -C tkcg -f $(MKFILE) install

tkcg_ee:
	$(MAKE) -j $(NUMJOBS) -C tkcg -f $(MKFILE) ee

tkcg_yac:
	$(MAKE) -j $(NUMJOBS) -C tkcg -f $(MKFILE) yac

tkcg_zip:
	$(RM) "$(TKS_ZIP_PREFIX)/tkcg.zip" ; zip -r -9 "$(TKS_ZIP_PREFIX)/tkcg.zip" tkcg


#
# tkfreetype2
#
.PHONY: tkfreetype2
tkfreetype2:
	$(MAKE) -j $(NUMJOBS) -C tkfreetype2 -f $(MKFILE) realclean ; $(MAKE) -j $(NUMJOBS) -C tkfreetype2 -f $(MKFILE) bin

tkfreetype2_clean:
	$(MAKE) -j $(NUMJOBS) -C tkfreetype2 -f $(MKFILE) realclean

tkfreetype2_bin:
	$(MAKE) -j $(NUMJOBS) -C tkfreetype2 -f $(MKFILE) bin

tkfreetype2_upx:
	$(MAKE) -j $(NUMJOBS) -C tkfreetype2 -f $(MKFILE) upx

tkfreetype2_install:
	$(MAKE) -j $(NUMJOBS) -C tkfreetype2 -f $(MKFILE) install

tkfreetype2_ee:
	$(MAKE) -j $(NUMJOBS) -C tkfreetype2 -f $(MKFILE) ee

tkfreetype2_yac:
	$(MAKE) -j $(NUMJOBS) -C tkfreetype2 -f $(MKFILE) yac

tkfreetype2_zip:
	$(RM) "$(TKS_ZIP_PREFIX)/tkfreetype2.zip" ; zip -r -9 "$(TKS_ZIP_PREFIX)/tkfreetype2.zip" tkfreetype2


#
# tkui
#
.PHONY: tkui
tkui:
	$(MAKE) -j $(NUMJOBS) -C tkui -f $(MKFILE) realclean ; $(MAKE) -j $(NUMJOBS) -C tkui -f $(MKFILE) bin

tkui_clean:
	$(MAKE) -j $(NUMJOBS) -C tkui -f $(MKFILE) realclean

tkui_bin:
	$(MAKE) -j $(NUMJOBS) -C tkui -f $(MKFILE) bin

tkui_upx:
	$(MAKE) -j $(NUMJOBS) -C tkui -f $(MKFILE) upx

tkui_install:
	$(MAKE) -j $(NUMJOBS) -C tkui -f $(MKFILE) install

tkui_ee:
	$(MAKE) -j $(NUMJOBS) -C tkui -f $(MKFILE) ee

tkui_yac:
	$(MAKE) -j $(NUMJOBS) -C tkui -f $(MKFILE) yac

tkui_zip:
	$(RM) "$(TKS_ZIP_PREFIX)/tkui.zip" ; zip -r -9 "$(TKS_ZIP_PREFIX)/tkui.zip" tkui


#
# tkfreeglut
#
.PHONY: tkfreeglut
tkfreeglut:
	$(MAKE) -j $(NUMJOBS) -C tkfreeglut -f $(MKFILE) realclean ; $(MAKE) -j $(NUMJOBS) -C tkfreeglut -f $(MKFILE) bin

tkfreeglut_clean:
	$(MAKE) -j $(NUMJOBS) -C tkfreeglut -f $(MKFILE) realclean

tkfreeglut_bin:
	$(MAKE) -j $(NUMJOBS) -C tkfreeglut -f $(MKFILE) bin

tkfreeglut_upx:
	$(MAKE) -j $(NUMJOBS) -C tkfreeglut -f $(MKFILE) upx

tkfreeglut_install:
	$(MAKE) -j $(NUMJOBS) -C tkfreeglut -f $(MKFILE) install

tkfreeglut_ee:
	$(MAKE) -j $(NUMJOBS) -C tkfreeglut -f $(MKFILE) ee

tkfreeglut_yac:
	$(MAKE) -j $(NUMJOBS) -C tkfreeglut -f $(MKFILE) yac

tkfreeglut_zip:
	$(RM) "$(TKS_ZIP_PREFIX)/tkfreeglut.zip" ; zip -r -9 "$(TKS_ZIP_PREFIX)/tkfreeglut.zip" tkfreeglut


#
# tkmath
#
.PHONY: tkmath
tkmath:
	$(MAKE) -j $(NUMJOBS) -C tkmath -f $(MKFILE) realclean ; $(MAKE) -j $(NUMJOBS) -C tkmath -f $(MKFILE) bin

tkmath_clean:
	$(MAKE) -j $(NUMJOBS) -C tkmath -f $(MKFILE) realclean

tkmath_bin:
	$(MAKE) -j $(NUMJOBS) -C tkmath -f $(MKFILE) bin

tkmath_upx:
	$(MAKE) -j $(NUMJOBS) -C tkmath -f $(MKFILE) upx

tkmath_install:
	$(MAKE) -j $(NUMJOBS) -C tkmath -f $(MKFILE) install

tkmath_ee:
	$(MAKE) -j $(NUMJOBS) -C tkmath -f $(MKFILE) ee

tkmath_yac:
	$(MAKE) -j $(NUMJOBS) -C tkmath -f $(MKFILE) yac

tkmath_zip:
	$(RM) "$(TKS_ZIP_PREFIX)/tkmath.zip" ; zip -r -9 "$(TKS_ZIP_PREFIX)/tkmath.zip" tkmath


#
# tkoldmath
#
.PHONY: tkoldmath
tkoldmath:
	$(MAKE) -j $(NUMJOBS) -C tkoldmath -f $(MKFILE) realclean ; $(MAKE) -j $(NUMJOBS) -C tkoldmath -f $(MKFILE) bin

tkoldmath_clean:
	$(MAKE) -j $(NUMJOBS) -C tkoldmath -f $(MKFILE) realclean

tkoldmath_bin:
	$(MAKE) -j $(NUMJOBS) -C tkoldmath -f $(MKFILE) bin

tkoldmath_upx:
	$(MAKE) -j $(NUMJOBS) -C tkoldmath -f $(MKFILE) upx

tkoldmath_install:
	$(MAKE) -j $(NUMJOBS) -C tkoldmath -f $(MKFILE) install

tkoldmath_ee:
	$(MAKE) -j $(NUMJOBS) -C tkoldmath -f $(MKFILE) ee

tkoldmath_yac:
	$(MAKE) -j $(NUMJOBS) -C tkoldmath -f $(MKFILE) yac

tkoldmath_zip:
	$(RM) "$(TKS_ZIP_PREFIX)/tkoldmath.zip" ; zip -r -9 "$(TKS_ZIP_PREFIX)/tkoldmath.zip" tkoldmath


#
# eqxmms
#
.PHONY: eqxmms
eqxmms:
	$(MAKE) -j $(NUMJOBS) -C eqxmms -f $(MKFILE) realclean ; $(MAKE) -j $(NUMJOBS) -C eqxmms -f $(MKFILE) bin

eqxmms_clean:
	$(MAKE) -j $(NUMJOBS) -C eqxmms -f $(MKFILE) realclean

eqxmms_bin:
	$(MAKE) -j $(NUMJOBS) -C eqxmms -f $(MKFILE) bin

eqxmms_upx:
	$(MAKE) -j $(NUMJOBS) -C eqxmms -f $(MKFILE) upx

eqxmms_install:
	$(MAKE) -j $(NUMJOBS) -C eqxmms -f $(MKFILE) install

eqxmms_ee:
	$(MAKE) -j $(NUMJOBS) -C eqxmms -f $(MKFILE) ee

eqxmms_yac:
	$(MAKE) -j $(NUMJOBS) -C eqxmms -f $(MKFILE) yac

eqxmms_zip:
	$(RM) "$(TKS_ZIP_PREFIX)/eqxmms.zip" ; zip -r -9 "$(TKS_ZIP_PREFIX)/eqxmms.zip" eqxmms


#
# tkchipmunk
#
.PHONY: tkchipmunk
tkchipmunk:
	$(MAKE) -j $(NUMJOBS) -C tkchipmunk -f $(MKFILE) realclean ; $(MAKE) -j $(NUMJOBS) -C tkchipmunk -f $(MKFILE) bin

tkchipmunk_clean:
	$(MAKE) -j $(NUMJOBS) -C tkchipmunk -f $(MKFILE) realclean

tkchipmunk_bin:
	$(MAKE) -j $(NUMJOBS) -C tkchipmunk -f $(MKFILE) bin

tkchipmunk_upx:
	$(MAKE) -j $(NUMJOBS) -C tkchipmunk -f $(MKFILE) upx

tkchipmunk_install:
	$(MAKE) -j $(NUMJOBS) -C tkchipmunk -f $(MKFILE) install

tkchipmunk_ee:
	$(MAKE) -j $(NUMJOBS) -C tkchipmunk -f $(MKFILE) ee

tkchipmunk_yac:
	$(MAKE) -j $(NUMJOBS) -C tkchipmunk -f $(MKFILE) yac

tkchipmunk_zip:
	$(RM) "$(TKS_ZIP_PREFIX)/tkchipmunk.zip" ; zip -r -9 "$(TKS_ZIP_PREFIX)/tkchipmunk.zip" tkchipmunk


#
# tkmidi
#
.PHONY: tkmidi
tkmidi:
	$(MAKE) -j $(NUMJOBS) -C tkmidi -f $(MKFILE) realclean ; $(MAKE) -j $(NUMJOBS) -C tkmidi -f $(MKFILE) bin

tkmidi_clean:
	$(MAKE) -j $(NUMJOBS) -C tkmidi -f $(MKFILE) realclean

tkmidi_bin:
	$(MAKE) -j $(NUMJOBS) -C tkmidi -f $(MKFILE) bin

tkmidi_upx:
	$(MAKE) -j $(NUMJOBS) -C tkmidi -f $(MKFILE) upx

tkmidi_install:
	$(MAKE) -j $(NUMJOBS) -C tkmidi -f $(MKFILE) install

tkmidi_ee:
	$(MAKE) -j $(NUMJOBS) -C tkmidi -f $(MKFILE) ee

tkmidi_yac:
	$(MAKE) -j $(NUMJOBS) -C tkmidi -f $(MKFILE) yac

tkmidi_zip:
	$(RM) "$(TKS_ZIP_PREFIX)/tkmidi.zip" ; zip -r -9 "$(TKS_ZIP_PREFIX)/tkmidi.zip" tkmidi


#
# tkmidi_oss
#
.PHONY: tkmidi_oss
tkmidi_oss:
	$(MAKE) -j $(NUMJOBS) -C tkmidi_oss -f $(MKFILE) realclean ; $(MAKE) -j $(NUMJOBS) -C tkmidi_oss -f $(MKFILE) bin

tkmidi_oss_clean:
	$(MAKE) -j $(NUMJOBS) -C tkmidi_oss -f $(MKFILE) realclean

tkmidi_oss_bin:
	$(MAKE) -j $(NUMJOBS) -C tkmidi_oss -f $(MKFILE) bin

tkmidi_oss_upx:
	$(MAKE) -j $(NUMJOBS) -C tkmidi_oss -f $(MKFILE) upx

tkmidi_oss_install:
	$(MAKE) -j $(NUMJOBS) -C tkmidi_oss -f $(MKFILE) install

tkmidi_oss_ee:
	$(MAKE) -j $(NUMJOBS) -C tkmidi_oss -f $(MKFILE) ee

tkmidi_oss_yac:
	$(MAKE) -j $(NUMJOBS) -C tkmidi_oss -f $(MKFILE) yac

tkmidi_oss_zip:
	$(RM) "$(TKS_ZIP_PREFIX)/tkmidi_oss.zip" ; zip -r -9 "$(TKS_ZIP_PREFIX)/tkmidi_oss.zip" tkmidi_oss


#
# tksmdi
#
.PHONY: tksmdi
tksmdi:
	$(MAKE) -j $(NUMJOBS) -C tksmdi -f $(MKFILE) realclean ; $(MAKE) -j $(NUMJOBS) -C tksmdi -f $(MKFILE) bin

tksmdi_clean:
	$(MAKE) -j $(NUMJOBS) -C tksmdi -f $(MKFILE) realclean

tksmdi_bin:
	$(MAKE) -j $(NUMJOBS) -C tksmdi -f $(MKFILE) bin

tksmdi_upx:
	$(MAKE) -j $(NUMJOBS) -C tksmdi -f $(MKFILE) upx

tksmdi_install:
	$(MAKE) -j $(NUMJOBS) -C tksmdi -f $(MKFILE) install

tksmdi_ee:
	$(MAKE) -j $(NUMJOBS) -C tksmdi -f $(MKFILE) ee

tksmdi_yac:
	$(MAKE) -j $(NUMJOBS) -C tksmdi -f $(MKFILE) yac

tksmdi_zip:
	$(RM) "$(TKS_ZIP_PREFIX)/tksmdi.zip" ; zip -r -9 "$(TKS_ZIP_PREFIX)/tksmdi.zip" tksmdi


#
# tkportaudio
#
.PHONY: tkportaudio
tkportaudio:
	$(MAKE) -j $(NUMJOBS) -C tkportaudio -f $(MKFILE) realclean ; $(MAKE) -j $(NUMJOBS) -C tkportaudio -f $(MKFILE) bin

tkportaudio_clean:
	$(MAKE) -j $(NUMJOBS) -C tkportaudio -f $(MKFILE) realclean

tkportaudio_bin:
	$(MAKE) -j $(NUMJOBS) -C tkportaudio -f $(MKFILE) bin

tkportaudio_upx:
	$(MAKE) -j $(NUMJOBS) -C tkportaudio -f $(MKFILE) upx

tkportaudio_install:
	$(MAKE) -j $(NUMJOBS) -C tkportaudio -f $(MKFILE) install

tkportaudio_ee:
	$(MAKE) -j $(NUMJOBS) -C tkportaudio -f $(MKFILE) ee

tkportaudio_yac:
	$(MAKE) -j $(NUMJOBS) -C tkportaudio -f $(MKFILE) yac

tkportaudio_zip:
	$(RM) "$(TKS_ZIP_PREFIX)/tkportaudio.zip" ; zip -r -9 "$(TKS_ZIP_PREFIX)/tkportaudio.zip" tkportaudio


#
# tkportaudio_oss
#
.PHONY: tkportaudio_oss
tkportaudio_oss:
	$(MAKE) -j $(NUMJOBS) -C tkportaudio_oss -f $(MKFILE) realclean ; $(MAKE) -j $(NUMJOBS) -C tkportaudio_oss -f $(MKFILE) bin

tkportaudio_oss_clean:
	$(MAKE) -j $(NUMJOBS) -C tkportaudio_oss -f $(MKFILE) realclean

tkportaudio_oss_bin:
	$(MAKE) -j $(NUMJOBS) -C tkportaudio_oss -f $(MKFILE) bin

tkportaudio_oss_upx:
	$(MAKE) -j $(NUMJOBS) -C tkportaudio_oss -f $(MKFILE) upx

tkportaudio_oss_install:
	$(MAKE) -j $(NUMJOBS) -C tkportaudio_oss -f $(MKFILE) install

tkportaudio_oss_ee:
	$(MAKE) -j $(NUMJOBS) -C tkportaudio_oss -f $(MKFILE) ee

tkportaudio_oss_yac:
	$(MAKE) -j $(NUMJOBS) -C tkportaudio_oss -f $(MKFILE) yac

tkportaudio_oss_zip:
	$(RM) "$(TKS_ZIP_PREFIX)/tkportaudio_oss.zip" ; zip -r -9 "$(TKS_ZIP_PREFIX)/tkportaudio_oss.zip" tkportaudio_oss


#
# tkportaudio_alsa_async
#
.PHONY: tkportaudio_alsa_async
tkportaudio_alsa_async:
	$(MAKE) -j $(NUMJOBS) -C tkportaudio_alsa_async -f $(MKFILE) realclean ; $(MAKE) -j $(NUMJOBS) -C tkportaudio_alsa_async -f $(MKFILE) bin

tkportaudio_alsa_async_clean:
	$(MAKE) -j $(NUMJOBS) -C tkportaudio_alsa_async -f $(MKFILE) realclean

tkportaudio_alsa_async_bin:
	$(MAKE) -j $(NUMJOBS) -C tkportaudio_alsa_async -f $(MKFILE) bin

tkportaudio_alsa_async_upx:
	$(MAKE) -j $(NUMJOBS) -C tkportaudio_alsa_async -f $(MKFILE) upx

tkportaudio_alsa_async_install:
	$(MAKE) -j $(NUMJOBS) -C tkportaudio_alsa_async -f $(MKFILE) install

tkportaudio_alsa_async_ee:
	$(MAKE) -j $(NUMJOBS) -C tkportaudio_alsa_async -f $(MKFILE) ee

tkportaudio_alsa_async_yac:
	$(MAKE) -j $(NUMJOBS) -C tkportaudio_alsa_async -f $(MKFILE) yac

tkportaudio_alsa_async_zip:
	$(RM) "$(TKS_ZIP_PREFIX)/tkportaudio_alsa_async.zip" ; zip -r -9 "$(TKS_ZIP_PREFIX)/tkportaudio_alsa_async.zip" tkportaudio_alsa_async


#
# tksampler
#
.PHONY: tksampler
tksampler:
	$(MAKE) -j $(NUMJOBS) -C tksampler -f $(MKFILE) realclean ; $(MAKE) -j $(NUMJOBS) -C tksampler -f $(MKFILE) bin

tksampler_clean:
	$(MAKE) -j $(NUMJOBS) -C tksampler -f $(MKFILE) realclean

tksampler_bin:
	$(MAKE) -j $(NUMJOBS) -C tksampler -f $(MKFILE) bin

tksampler_upx:
	$(MAKE) -j $(NUMJOBS) -C tksampler -f $(MKFILE) upx

tksampler_install:
	$(MAKE) -j $(NUMJOBS) -C tksampler -f $(MKFILE) install

tksampler_ee:
	$(MAKE) -j $(NUMJOBS) -C tksampler -f $(MKFILE) ee

tksampler_yac:
	$(MAKE) -j $(NUMJOBS) -C tksampler -f $(MKFILE) yac

tksampler_zip:
	$(RM) "$(TKS_ZIP_PREFIX)/tksampler.zip" ; zip -r -9 "$(TKS_ZIP_PREFIX)/tksampler.zip" tksampler


#
# tksampleedit
#
.PHONY: tksampleedit
tksampleedit:
	$(MAKE) -j $(NUMJOBS) -C tksampleedit -f $(MKFILE) realclean ; $(MAKE) -j $(NUMJOBS) -C tksampleedit -f $(MKFILE) bin

tksampleedit_clean:
	$(MAKE) -j $(NUMJOBS) -C tksampleedit -f $(MKFILE) realclean

tksampleedit_bin:
	$(MAKE) -j $(NUMJOBS) -C tksampleedit -f $(MKFILE) bin

tksampleedit_upx:
	$(MAKE) -j $(NUMJOBS) -C tksampleedit -f $(MKFILE) upx

tksampleedit_install:
	$(MAKE) -j $(NUMJOBS) -C tksampleedit -f $(MKFILE) install

tksampleedit_ee:
	$(MAKE) -j $(NUMJOBS) -C tksampleedit -f $(MKFILE) ee

tksampleedit_yac:
	$(MAKE) -j $(NUMJOBS) -C tksampleedit -f $(MKFILE) yac

tksampleedit_zip:
	$(RM) "$(TKS_ZIP_PREFIX)/tksampleedit.zip" ; zip -r -9 "$(TKS_ZIP_PREFIX)/tksampleedit.zip" tksampleedit


#
# tksidplay2
#
.PHONY: tksidplay2
tksidplay2:
	$(MAKE) -j $(NUMJOBS) -C tksidplay2 -f $(MKFILE) realclean ; $(MAKE) -j $(NUMJOBS) -C tksidplay2 -f $(MKFILE) bin

tksidplay2_clean:
	$(MAKE) -j $(NUMJOBS) -C tksidplay2 -f $(MKFILE) realclean

tksidplay2_bin:
	$(MAKE) -j $(NUMJOBS) -C tksidplay2 -f $(MKFILE) bin

tksidplay2_upx:
	$(MAKE) -j $(NUMJOBS) -C tksidplay2 -f $(MKFILE) upx

tksidplay2_install:
	$(MAKE) -j $(NUMJOBS) -C tksidplay2 -f $(MKFILE) install

tksidplay2_ee:
	$(MAKE) -j $(NUMJOBS) -C tksidplay2 -f $(MKFILE) ee

tksidplay2_yac:
	$(MAKE) -j $(NUMJOBS) -C tksidplay2 -f $(MKFILE) yac

tksidplay2_zip:
	$(RM) "$(TKS_ZIP_PREFIX)/tksidplay2.zip" ; zip -r -9 "$(TKS_ZIP_PREFIX)/tksidplay2.zip" tksidplay2


#
# tkfreeverb
#
.PHONY: tkfreeverb
tkfreeverb:
	$(MAKE) -j $(NUMJOBS) -C tkfreeverb -f $(MKFILE) realclean ; $(MAKE) -j $(NUMJOBS) -C tkfreeverb -f $(MKFILE) bin

tkfreeverb_clean:
	$(MAKE) -j $(NUMJOBS) -C tkfreeverb -f $(MKFILE) realclean

tkfreeverb_bin:
	$(MAKE) -j $(NUMJOBS) -C tkfreeverb -f $(MKFILE) bin

tkfreeverb_upx:
	$(MAKE) -j $(NUMJOBS) -C tkfreeverb -f $(MKFILE) upx

tkfreeverb_install:
	$(MAKE) -j $(NUMJOBS) -C tkfreeverb -f $(MKFILE) install

tkfreeverb_ee:
	$(MAKE) -j $(NUMJOBS) -C tkfreeverb -f $(MKFILE) ee

tkfreeverb_yac:
	$(MAKE) -j $(NUMJOBS) -C tkfreeverb -f $(MKFILE) yac

tkfreeverb_zip:
	$(RM) "$(TKS_ZIP_PREFIX)/tkfreeverb.zip" ; zip -r -9 "$(TKS_ZIP_PREFIX)/tkfreeverb.zip" tkfreeverb


#
# tksynth
#
.PHONY: tksynth
tksynth:
	$(MAKE) -j $(NUMJOBS) -C tksynth -f $(MKFILE) realclean ; $(MAKE) -j $(NUMJOBS) -C tksynth -f $(MKFILE) bin

tksynth_clean:
	$(MAKE) -j $(NUMJOBS) -C tksynth -f $(MKFILE) realclean

tksynth_bin:
	$(MAKE) -j $(NUMJOBS) -C tksynth -f $(MKFILE) bin

tksynth_upx:
	$(MAKE) -j $(NUMJOBS) -C tksynth -f $(MKFILE) upx

tksynth_install:
	$(MAKE) -j $(NUMJOBS) -C tksynth -f $(MKFILE) install

tksynth_ee:
	$(MAKE) -j $(NUMJOBS) -C tksynth -f $(MKFILE) ee

tksynth_yac:
	$(MAKE) -j $(NUMJOBS) -C tksynth -f $(MKFILE) yac

tksynth_zip:
	$(RM) "$(TKS_ZIP_PREFIX)/tksynth.zip" ; zip -r -9 "$(TKS_ZIP_PREFIX)/tksynth.zip" tksynth


#
# tkdist2d
#
.PHONY: tkdist2d
tkdist2d:
	$(MAKE) -j $(NUMJOBS) -C tkdist2d -f $(MKFILE) realclean ; $(MAKE) -j $(NUMJOBS) -C tkdist2d -f $(MKFILE) bin

tkdist2d_clean:
	$(MAKE) -j $(NUMJOBS) -C tkdist2d -f $(MKFILE) realclean

tkdist2d_bin:
	$(MAKE) -j $(NUMJOBS) -C tkdist2d -f $(MKFILE) bin

tkdist2d_upx:
	$(MAKE) -j $(NUMJOBS) -C tkdist2d -f $(MKFILE) upx

tkdist2d_install:
	$(MAKE) -j $(NUMJOBS) -C tkdist2d -f $(MKFILE) install

tkdist2d_ee:
	$(MAKE) -j $(NUMJOBS) -C tkdist2d -f $(MKFILE) ee

tkdist2d_yac:
	$(MAKE) -j $(NUMJOBS) -C tkdist2d -f $(MKFILE) yac

tkdist2d_zip:
	$(RM) "$(TKS_ZIP_PREFIX)/tkdist2d.zip" ; zip -r -9 "$(TKS_ZIP_PREFIX)/tkdist2d.zip" tkdist2d


#
# polyraster
#
.PHONY: polyraster
polyraster:
	$(MAKE) -j $(NUMJOBS) -C polyraster -f $(MKFILE) realclean ; $(MAKE) -j $(NUMJOBS) -C polyraster -f $(MKFILE) bin

polyraster_clean:
	$(MAKE) -j $(NUMJOBS) -C polyraster -f $(MKFILE) realclean

polyraster_bin:
	$(MAKE) -j $(NUMJOBS) -C polyraster -f $(MKFILE) bin

polyraster_upx:
	$(MAKE) -j $(NUMJOBS) -C polyraster -f $(MKFILE) upx

polyraster_install:
	$(MAKE) -j $(NUMJOBS) -C polyraster -f $(MKFILE) install

polyraster_ee:
	$(MAKE) -j $(NUMJOBS) -C polyraster -f $(MKFILE) ee

polyraster_yac:
	$(MAKE) -j $(NUMJOBS) -C polyraster -f $(MKFILE) yac

polyraster_zip:
	$(RM) "$(TKS_ZIP_PREFIX)/polyraster.zip" ; zip -r -9 "$(TKS_ZIP_PREFIX)/polyraster.zip" polyraster


#
# tkfileutils
#
.PHONY: tkfileutils
tkfileutils:
	$(MAKE) -j $(NUMJOBS) -C tkfileutils -f $(MKFILE) realclean ; $(MAKE) -j $(NUMJOBS) -C tkfileutils -f $(MKFILE) bin

tkfileutils_clean:
	$(MAKE) -j $(NUMJOBS) -C tkfileutils -f $(MKFILE) realclean

tkfileutils_bin:
	$(MAKE) -j $(NUMJOBS) -C tkfileutils -f $(MKFILE) bin

tkfileutils_upx:
	$(MAKE) -j $(NUMJOBS) -C tkfileutils -f $(MKFILE) upx

tkfileutils_install:
	$(MAKE) -j $(NUMJOBS) -C tkfileutils -f $(MKFILE) install

tkfileutils_ee:
	$(MAKE) -j $(NUMJOBS) -C tkfileutils -f $(MKFILE) ee

tkfileutils_yac:
	$(MAKE) -j $(NUMJOBS) -C tkfileutils -f $(MKFILE) yac

tkfileutils_zip:
	$(RM) "$(TKS_ZIP_PREFIX)/tkfileutils.zip" ; zip -r -9 "$(TKS_ZIP_PREFIX)/tkfileutils.zip" tkfileutils


#
# tkvst
#
.PHONY: tkvst
tkvst:
	$(MAKE) -j $(NUMJOBS) -C tkvst -f $(MKFILE) realclean ; $(MAKE) -j $(NUMJOBS) -C tkvst -f $(MKFILE) bin

tkvst_clean:
	$(MAKE) -j $(NUMJOBS) -C tkvst -f $(MKFILE) realclean

tkvst_bin:
	$(MAKE) -j $(NUMJOBS) -C tkvst -f $(MKFILE) bin

tkvst_upx:
	$(MAKE) -j $(NUMJOBS) -C tkvst -f $(MKFILE) upx

tkvst_install:
	$(MAKE) -j $(NUMJOBS) -C tkvst -f $(MKFILE) install

tkvst_ee:
	$(MAKE) -j $(NUMJOBS) -C tkvst -f $(MKFILE) ee

tkvst_yac:
	$(MAKE) -j $(NUMJOBS) -C tkvst -f $(MKFILE) yac

tkvst_zip:
	$(RM) "$(TKS_ZIP_PREFIX)/tkvst.zip" ; zip -r -9 "$(TKS_ZIP_PREFIX)/tkvst.zip" tkvst


#
# tkcustomsynth
#
.PHONY: tkcustomsynth
tkcustomsynth:
	$(MAKE) -j $(NUMJOBS) -C tkcustomsynth -f $(MKFILE) realclean ; $(MAKE) -j $(NUMJOBS) -C tkcustomsynth -f $(MKFILE) bin

tkcustomsynth_clean:
	$(MAKE) -j $(NUMJOBS) -C tkcustomsynth -f $(MKFILE) realclean

tkcustomsynth_bin:
	$(MAKE) -j $(NUMJOBS) -C tkcustomsynth -f $(MKFILE) bin

tkcustomsynth_upx:
	$(MAKE) -j $(NUMJOBS) -C tkcustomsynth -f $(MKFILE) upx

tkcustomsynth_install:
	$(MAKE) -j $(NUMJOBS) -C tkcustomsynth -f $(MKFILE) install

tkcustomsynth_ee:
	$(MAKE) -j $(NUMJOBS) -C tkcustomsynth -f $(MKFILE) ee

tkcustomsynth_yac:
	$(MAKE) -j $(NUMJOBS) -C tkcustomsynth -f $(MKFILE) yac

tkcustomsynth_zip:
	$(RM) "$(TKS_ZIP_PREFIX)/tkcustomsynth.zip" ; zip -r -9 "$(TKS_ZIP_PREFIX)/tkcustomsynth.zip" tkcustomsynth
