forked from pubnub/javascript
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
30 lines (25 loc) · 979 Bytes
/
Makefile
File metadata and controls
30 lines (25 loc) · 979 Bytes
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
include ../Makefile.inc
OUTPUT_FILES=$(PUBNUB_MIN_JS)
PLATFORM=Web
.PHONY : all
all: build
.PHONY : build
build: $(PUBNUB_MIN_JS)
$(PUBNUB_MIN_JS) : $(JSON_JS) $(PUBNUB_COMMON_JS) $(WEBSOCKET_JS) $(PUBNUB_PLATFORM_JS)
## Full Version
$(ECHO) "// Version: $(VERSION)" > $(PUBNUB_JS)
cat $(JSON_JS) $(PUBNUB_COMMON_JS) $(CRYPTO_OBJ_JS) $(PUBNUB_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)
cp $(PUBNUB_MIN_JS) ../smart-tv/
cp $(PUBNUB_JS) ../smart-tv/
.PHONY : clean
clean:
rm -f $(OUTPUT_FILES)
include ../Makefile.post