-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
35 lines (27 loc) · 680 Bytes
/
Makefile
File metadata and controls
35 lines (27 loc) · 680 Bytes
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
EMCC?=emcc
EMXX?=em++
COFFEE?=coffee
# you may have to define mingw path like this.
#MINGW?=/path/to/mingw
DEFS=-D_X86_ -DWIN32 -DUNICODE -DWIN32_LEAN_AND_MEAN
OBJS=src/library_win32.js src/window.js
EXAMPLES=examples/hello.js
INCS=
ifdef MINGW
INCS=-I $(MINGW)/include
endif
.PHONY: all
all: $(OBJS)
src/%.js: src/%.coffee
$(COFFEE) --bare -c $<
.PHONY: examples
examples: $(EXAMPLES)
mkdir -p examples/lib
$(MAKE) -C lib/fake-mswin all assets OUTDIR=../../examples/lib
examples/%.js: examples/%.cpp all
$(EMXX) -o $@ --js-library src/library_win32.js --pre-js src/window.js \
$< $(INCS) $(DEFS)
.PHONY: clean
clean:
rm -f $(OBJS) $(EXAMPLES)
rm -rf examples/lib