forked from pubnub/javascript
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
35 lines (29 loc) · 1.23 KB
/
Makefile
File metadata and controls
35 lines (29 loc) · 1.23 KB
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
include ../Makefile.inc
OUTPUT_FILES=$(PUBNUB_MIN_JS) $(PUBNUB_CRYPTO_MIN_JS)
PLATFORM=Sencha
MODERN_PLATFORM_JS=../modern/$(PUBNUB_PLATFORM_JS)
.PHONY : all
all: build
.PHONY : build
build: $(PUBNUB_MIN_JS) $(PUBNUB_CRYPTO_MIN_JS)
$(PUBNUB_MIN_JS) : $(PUBNUB_COMMON_JS) $(WEBSOCKET_JS) $(MODERN_PLATFORM_JS)
## Full Version
$(ECHO) "// Version: $(VERSION)" > $(PUBNUB_JS)
cat $(PUBNUB_COMMON_JS) $(CRYPTO_OBJ_JS) $(MODERN_PLATFORM_JS) $(WEBSOCKET_JS) >> $(PUBNUB_JS)
sed -i -e "s/VERSION/\'$(VERSION)\'/g" $(PUBNUB_JS)
sed -i -e "s/PLATFORM/\'$(PLATFORM)\'/g" $(PUBNUB_JS)
## Minfied Version
$(ECHO) "// Version: $(VERSION)" > $(PUBNUB_MIN_JS)
$(ECHO) "(function(){" >> $(PUBNUB_MIN_JS)
cat $(CRYPTOJS_HMAC_SHA256_JS) $(CRYPTOJS_ENC_BASE64_JS) >> $(PUBNUB_MIN_JS)
cat $(PUBNUB_JS) | java -jar $(GOOGLE_MINIFY) --compilation_level=ADVANCED_OPTIMIZATIONS >> $(PUBNUB_MIN_JS)
$(ECHO) "})();" >> $(PUBNUB_MIN_JS)
$(PUBNUB_CRYPTO_MIN_JS) : $(GIBBERISH_JS) $(ENCRYPTO_JS)
## Cryptography
$(ECHO) "(function(){" > $(PUBNUB_CRYPTO_MIN_JS)
cat $(GIBBERISH_JS) $(ENCRYPT_JS) | java -jar $(GOOGLE_MINIFY) >> $(PUBNUB_CRYPTO_MIN_JS)
$(ECHO) "})();" >> $(PUBNUB_CRYPTO_MIN_JS)
.PHONY : clean
clean:
rm -f $(OUTPUT_FILES)
include ../Makefile.post