ENGINE_URL=https://code.idtech.space/fte/fteqw
ENGINE_CLBUILD=m-dbg

all: list

list:
	./start.sh

index: fteqw64
	./index.sh

fteqw64:
	if [ ! -d ThirdParty/fteqw ];then mkdir -p ThirdParty; git clone --depth 1 $(ENGINE_URL) ThirdParty/fteqw;else cd ./ThirdParty/fteqw && git pull;fi
	cd ThirdParty/fteqw/engine && $(MAKE) makelibs ARCH=x86_64
	cd ThirdParty/fteqw/engine && $(MAKE) $(ENGINE_CLBUILD) ARCH=x86_64
	install -m 0777 ./ThirdParty/fteqw/engine/debug/fteqw ./fteqw64
