This repository has been archived by the owner on May 24, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile
54 lines (40 loc) · 1.7 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
TRACEUR:=node --stack_trace_limit=64 `npm bin`/traceur --experimental --trap-member-lookup=false --private-names=false
ARCH_LIST:=8051 arm x86
ARCH_JS:=$(ARCH_LIST:%=disasm/arch-%.js)
PLATFORM_LIST:=linux windows
PLATFORM_JS:=platform/platform.js $(PLATFORM_LIST:%=platform/%.h.js)
all: node_modules ${ARCH_JS} ${PLATFORM_JS}
node_modules: package.json
@npm install
@touch node_modules
.PRECIOUS: node_modules
disasm/arch-%.js: disasm/%.js disasm/Disasm.js disasm/codegen-js.js disasm/codegen-js-base.js node_modules
@echo Generating "$@"...
@${TRACEUR} "$<" > /dev/null
.PRECIOUS: disasm/arch-%.js
%.analyzed: % analyzer.js ${ARCH_JS} ${PLATFORM_JS}
@echo Analyzing "$<"...
@${TRACEUR} analyzer.js ${ANALYSIS_ARGS} "$<" > "$@" 2>&1
.PRECIOUS: %.analyzed
%.analyzed.html: %.analyzed deps/highlight.html
@cat deps/highlight.html > "$@"
@echo "<pre lang=js>" >> "$@"
@cat "$<" | sed 's/</\</g' >> "$@"
@echo "</pre>" >> "$@"
Password.dll:
@wget -O "$@" http://eu.depot.battle.net:1119/8f52906a2c85b416a595702251570f96d3522f39237603115f2f1ab24962043c.auth
test: Password.dll.analyzed
clean:
-rm -rf disasm/arch-*.js cparse/c11.y.js platform/*.h platform/*.h.js *.analyzed
.PHONY: all test clean
# CParse.
%.y.js: %.l %.y deps/codeaze/codeaze.js cparse/yacc2codeaze.js
@${TRACEUR} cparse/yacc2codeaze.js "$*.l" "$*.y" > "$@"
%.h.js: %.h cparse/cparse.js cparse/c11.y.js
@${TRACEUR} cparse/cparse.js "$<" > "$@"
.PRECIOUS: %.h.js
# Platform.
platform/windows.h: platform/windows.h.in
@${CC} -I/usr/include/wine/windows -Ideps/mingw-w64/mingw-w64-{crt/include,headers/{crt,include}} -m32 -E -P -x c "$<" | sed 's/\s*#pragma.*//' > "$@"
platform/linux.h: platform/linux.h.in
@${CC} -m32 -E -P -x c "$<" > "$@"