aboutsummaryrefslogtreecommitdiff
path: root/ext/fiddle/Makefile
blob: b274574d7f41657dcab9d27c72ce16d4caf56c0e (plain)
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
# This GNU makefile exists primarily to simplify/speed up development
# from emacs. It is not part of the canonical build process.
default:
	$(MAKE) -C ../.. wasm -e emcc_opt=-O0

clean:
	$(MAKE) -C ../../ clean-wasm

fiddle_files = emscripten.css fiddle.html \
             fiddle.js fiddle-module.js \
             fiddle-module.wasm fiddle-worker.js \
             $(wildcard *.wasm.gz) $(wildcard *.js.gz)

# fiddle_remote is the remote destination for the fiddle app. It
# must be a [user@]HOST:/path for rsync.
# Note that the target "should probably" contain a symlink of
# index.html -> fiddle.html.
fiddle_remote ?=
ifeq (,$(fiddle_remote))
ifneq (,$(wildcard /home/stephan))
  fiddle_remote = wh:www/wh/sqlite3/.
else ifneq (,$(wildcard /home/drh))
  #fiddle_remote = if appropriate, add that user@host:/path here
endif
endif

$(fiddle_files): default

push-fiddle: $(fiddle_files)
	@if [ x = "x$(fiddle_remote)" ]; then \
		echo "fiddle_remote must be a [user@]HOST:/path for rsync"; \
		exit 1; \
	fi
	rsync -va $(fiddle_files) $(fiddle_remote)