-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
30 lines (21 loc) · 872 Bytes
/
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
TARGET_DIR = target
TARGET_MHEG_DIR = $(TARGET_DIR)/mheg
TARGET_ASN_DIR = $(TARGET_DIR)/asn
COMPILER_JAR = ~/Downloads/MhegPlus.Compiler-1.0.1.jar
COMPILER_CMD = java -jar $(COMPILER_JAR)
PLAYER_JAR = ~/Downloads/MhegPlus.MhegPlayer-1.0.1.jar
MHEG_PROFILE = uk.dtt
PLAYER_MAPPINGS = -Dfile-mapping.//a=$(TARGET_MHEG_DIR)/a -Dfile-mapping.//slate.asn=$(TARGET_MHEG_DIR)/slate.mhg
PLAYER_OPTS = -Ddfs-root-dir=$(TARGET_ASN_DIR) -Dmheg-source-root=$(TARGET_MHEG_DIR) -Dmheg.profile=$(MHEG_PROFILE) $(PLAYER_MAPPINGS)
.PHONY: all
all: mheg asn
mheg:
mkdir -p $(TARGET_MHEG_DIR) &> /dev/null
$(COMPILER_CMD) -f src/a -p -P -t src/slate.mheg+ -d $(TARGET_MHEG_DIR)
asn:
mkdir -p $(TARGET_ASN_DIR) &> /dev/null
$(COMPILER_CMD) -f src/a -p -P -a src/slate.mheg+ -d $(TARGET_ASN_DIR)
play: mheg asn
java $(PLAYER_OPTS) -jar $(PLAYER_JAR)
clean:
rm -rf $(TARGET_DIR)