diff options
author | 2013-06-07 11:59:57 -0700 | |
---|---|---|
committer | 2013-06-07 11:59:57 -0700 | |
commit | 8690d56ff0bbd1031e8cc6788dd2159aac6b7adb (patch) | |
tree | d573336305dc756f357f20dd986f77cb3ceafb9b /src/js/chrome/build.mk | |
parent | f42930c2226d07482725b03ad522c106c0bdec8b (diff) |
Reorganize the build system
* Move all javascript source to src/js
* Update the test runner, etc.
* Do less javascript compilation
Diffstat (limited to 'src/js/chrome/build.mk')
-rw-r--r-- | src/js/chrome/build.mk | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/src/js/chrome/build.mk b/src/js/chrome/build.mk new file mode 100644 index 0000000..b93cc6f --- /dev/null +++ b/src/js/chrome/build.mk @@ -0,0 +1,48 @@ + + +# Chrome Extension ############################################################# + +all: $(build-dir)/fiveui.crx + +chrome-dir := $(path) + +chrome-build := $(build-dir)/chrome + + +# Generic Extension Parts ###################################################### + +# pull in the base fiveui extension +$(eval $(call stage-fiveui,$(chrome-build),$(build-dir)/fiveui.crx)) + + +# Chrome File Staging ########################################################## + +# copy over scripts from the chrome extension +$(chrome-build)/data/js/%: $(chrome-dir)/js/% | $(chrome-build)/data/js + $(call cmd,cp) + +$(chrome-build)/data/injected/%: $(chrome-dir)/injected/% | $(chrome-build)/data/injected + $(call cmd,cp) + +$(chrome-build)/data/%: $(chrome-dir)/% | $(chrome-build)/data + $(call cmd,cp) + +$(chrome-build)/%: $(chrome-dir)/% | $(chrome-build) + $(call cmd,cp) + +$(chrome-build): | $(build-dir) + $(call cmd,mkdir) + + +# Packaging #################################################################### + +# generate the executable after copying over all files +$(build-dir)/fiveui.crx: $(chrome-build)/manifest.json \ + $(chrome-build)/data/background.html \ + $(chrome-build)/data/js/platform-port.js \ + $(chrome-build)/data/js/platform-background.js \ + | $(chrome-build) + $(call label,MAKECRX $(call drop-prefix,$@)) ( cd $(build-dir) \ + && $(topdir)/tools/bin/makecrx $(chrome-build) \ + $(topdir)/fiveui.pem fiveui \ + $(redir) ) |