all: build run

JAVAC = javac -encoding EUC-JP
JAVA = env __GL_NO_DSO_FINALIZER=1 java -cp classes

BASEDIR = ../../../unpacked
MODEL = chara/1/00100/model/100100_1_01_000.dxg
#MODEL = chara/1/00101/model/100101_1_04_000.dxg
#MODEL = chara/2/02201/model/202201_1_01_000.dxg
VRA = chara/2/01201/attr/201201_0_02_000.vra # 髪の毛?
#VRA = item/1/00/00000/attr/10000000_0_0.vra # 帽子
#VRA = item/1/05/00000/attr/10500000_0_0.vra # 靴
#VRA = item/1/22/00070/attr/12200070_1_0.vra # ひまわり

run: run-view

run-vra:
	$(JAVA) Vra $(BASEDIR) $(VRA)

run-view: classes classes/timestamp
	$(JAVA) Viewer $(BASEDIR) $(VRA)

build: classes classes/timestamp

classes/timestamp: *.java
	$(JAVAC) -d classes *.java
	touch classes/timestamp

classes:
	mkdir classes

clean::
	rm -rf classes
	rm -f hs_err*.log
