forked from pubnub/javascript
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
29 lines (24 loc) · 949 Bytes
/
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
include ../Makefile.inc
OUTPUT_FILES=$(PUBNUB_MIN_JS)
PLATFORM=Webos
MODERN_PLATFORM_JS=../modern/$(PUBNUB_PLATFORM_JS)
.PHONY : all
all: build
.PHONY : build
build: $(PUBNUB_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)
.PHONY : clean
clean:
rm -f $(OUTPUT_FILES)
include ../Makefile.post