Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Support for debug build that doesn't minify the JavaScript - Only build items that have changed
- Loading branch information
1 parent
8fb2c1e
commit d3e9940
Showing
3 changed files
with
51 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,4 +3,6 @@ data.js | |
snapshots | ||
.DS_Store | ||
tools | ||
build | ||
debug | ||
release | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,46 @@ | ||
|
||
YUI=java -jar tools/yuicompressor-2.4.6.jar | ||
TYPE=debug | ||
|
||
ifeq ($(TYPE),release) | ||
OUTPUTDIR=release | ||
YUI=java -jar tools/yuicompressor-2.4.6.jar --type js | ||
else | ||
OUTPUTDIR=debug | ||
YUI=cat | ||
endif | ||
|
||
NANOWASP_JS=nanowasp.js crtc.js crtcmemory.js data.js keyboard.js latchrom.js memmapper.js memory.js microbee.js utils.js z80cpu.js | ||
Z80_JS=z80/z80_full.js z80/z80_ops_full.js | ||
CONTENT=nanowasp.html about.html images/dave.jpg images/monitor.jpg htaccess | ||
IMAGES=$(OUTPUTDIR)/dave.jpg $(OUTPUTDIR)/monitor.jpg | ||
|
||
|
||
.PHONY: nanowasp | ||
nanowasp: $(OUTPUTDIR)/nanowasp.js $(OUTPUTDIR)/z80.js $(OUTPUTDIR)/index.html $(OUTPUTDIR)/about.html $(IMAGES) | ||
|
||
$(OUTPUTDIR)/index.html: nanowasp.html | $(OUTPUTDIR) | ||
cp $< $@ | ||
|
||
$(OUTPUTDIR)/about.html: about.html | $(OUTPUTDIR) | ||
cp $< $@ | ||
|
||
$(OUTPUTDIR)/.htaccess: htaccess | $(OUTPUTDIR) | ||
cp $< $@ | ||
|
||
$(IMAGES): $(OUTPUTDIR)/%: images/% | ||
cp $< $@ | ||
|
||
all: nanowasp | ||
$(OUTPUTDIR)/nanowasp.js: $(NANOWASP_JS) | $(OUTPUTDIR) | ||
cat $(NANOWASP_JS) | $(YUI) > $@ | ||
gzip -c $@ > $@.gz | ||
|
||
nanowasp: nanowasp_js z80_js $(CONTENT) | ||
cp $(CONTENT) build | ||
mv build/htaccess build/.htaccess | ||
mv build/nanowasp.html build/index.html | ||
$(OUTPUTDIR)/z80.js: $(Z80_JS) | $(OUTPUTDIR) z80 | ||
cat $(Z80_JS) | $(YUI) > $@ | ||
gzip -c $@ > $@.gz | ||
|
||
nanowasp_js: $(NANOWASP_JS) | ||
mkdir -p build | ||
cat $(NANOWASP_JS) | $(YUI) --type js > build/nanowasp.js | ||
gzip -c build/nanowasp.js > build/nanowasp.js.gz | ||
.PHONY: z80 | ||
z80: | ||
cd z80 && $(MAKE) | ||
|
||
z80_js: z80/* | ||
cd z80 && make | ||
mkdir -p build | ||
cat $(Z80_JS) | $(YUI) --type js > build/z80.js | ||
gzip -c build/z80.js > build/z80.js.gz | ||
$(OUTPUTDIR): | ||
mkdir -p $@ | ||
|