-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
40 lines (30 loc) · 1.06 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
CC=javac
PACKAGE=beholder
SRC=src/$(PACKAGE)/{PlayerCharacter.java,Cleric.java,Fighter.java,Paladin.java,Ranger.java,Rogue.java,Warlock.java,Warlord.java,Wizard.java,Die.java,AtWillPower.java,EncounterPower.java,DailyPower.java,UtilityPower.java,Feat.java}
TEST_SRC=test/src/$(PACKAGE)/PlayerCharacterTest.java
BUILD_PATH=bin
TEST_BUILD_PATH=test/bin
TRANSLATE_PATH=translation
TRANSLATOR=../j2objc/dist/j2objc
DATA_PATH=data
CLASSPATH=/Library/Java/Extensions/junit4.10/junit-4.10.jar:$(TEST_BUILD_PATH)
pc: $(SRC)
$(CC) $< -d $(BUILD_PATH)
test: $(TEST_SRC)
$(CC) $< -sourcepath src -d $(TEST_BUILD_PATH) -cp $(CLASSPATH)
runtests: test
java -cp $(CLASSPATH) org.junit.runner.JUnitCore $(PACKAGE).PlayerCharacterTest
translate:
mkdir -p $(TRANSLATE_PATH)
$(TRANSLATOR) -d $(TRANSLATE_PATH) $(SRC)
database:
touch $(DATA_PATH)/beholder.db
python create_db.py
clean:
rm -rf $(BUILD_PATH) $(TEST_BUILD_PATH) $(TRANSLATE_PATH)
$(SRC): | $(BUILD_PATH)
$(BUILD_PATH):
mkdir $(BUILD_PATH)
$(TEST_SRC): | $(TEST_BUILD_PATH)
$(TEST_BUILD_PATH):
mkdir $(TEST_BUILD_PATH)