-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
40 lines (33 loc) · 1.17 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
#############################################################################
-include Makefile.options
deploy_dir?=
#############################################################################
dist:
mkdir -p $@
dist/bundle.js: app/audio.js app/audio-ffmpeg.js app/audio-ffmpeg2.js app/audio-mp3.js app/audio-wav.js | dist
browserify app/audio.js > $@_
mv $@_ $@
dist/lame.min.js: node_modules/lamejs/lame.min.js | dist
cp $< $@
dist/ffmpeg.min.js: node_modules/@ffmpeg/ffmpeg/dist/ffmpeg.min.js | dist
cp $< $@
dist/ffmpeg.min.js.map: node_modules/@ffmpeg/ffmpeg/dist/ffmpeg.min.js.map | dist
cp $< $@
.build.done: dist/bundle.js dist/lame.min.js dist/ffmpeg.min.js dist/ffmpeg.min.js.map
touch $@
compile: .build.done | dist
#############################################################################
serve:
npm start
prepare:
npm install
#############################################################################
$(deploy_dir)/dist:
mkdir -p $@
copy_deploy: | $(deploy_dir)/dist
cp index.html $(deploy_dir)/
cp -r dist/* $(deploy_dir)/dist/
#############################################################################
clean:
rm -rf dist
rm -rf node_modules