forked from pubnub/javascript
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
26 lines (21 loc) · 773 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
include ../Makefile.inc
OUTPUT_FILES=$(PUBNUB_JS)
EXAMPLE_RESOURCES=$(shell for file in `find examples -name "pubnub.js" | grep -v build`;do echo $$file; done)
PLATFORM=Titanium
.PHONY : all
all: build
.PHONY : build
build: $(PUBNUB_JS)
$(PUBNUB_JS) : $(JSON_JS) $(PUBNUB_COMMON_JS) $(PUBNUB_PLATFORM_JS)
$(ECHO) -n "// " > $(PUBNUB_JS)
$(ECHO) $(VERSION) >> $(PUBNUB_JS)
$(ECHO) "(function(){" >> $(PUBNUB_JS)
cat $(PUBNUB_COMMON_JS) $(CRYPTO_OBJ_JS) $(PUBNUB_PLATFORM_JS) >> $(PUBNUB_JS)
sed -i -e "s/VERSION/\'$(VERSION)\'/g" $(PUBNUB_JS)
sed -i -e "s/PLATFORM/\'$(PLATFORM)\'/g" $(PUBNUB_JS)
$(ECHO) "})();" >> $(PUBNUB_JS)
for f in $(EXAMPLE_RESOURCES); do cp $(PUBNUB_JS) $$f ; done
.PHONY : clean
clean:
rm -f $(OUTPUT_FILES)
include ../Makefile.post