-
Notifications
You must be signed in to change notification settings - Fork 8
/
Makefile
49 lines (38 loc) · 1.23 KB
/
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
SAFARI = Amp.safariextension
CHROME = Amp\ Chrome
CYAN = \033[0;36m
GREEN = \033[0;32m
BOLD = \033[1m
PLAIN = \033[0m
no_target: notarget all
all: chrome safari
notarget:
@ echo "$(CYAN)$(BOLD)Note:$(PLAIN)$(CYAN) No target specified for make; building all targets.$(PLAIN)"
chrome: clean_chrome
@ echo "> Copying files to Chrome extension folder..."
@ cp -R icons $(CHROME)/icons
@ cd src; cp amp.js background.js ../$(CHROME)
@ echo "$(GREEN)Chrome extention is ready!$(PLAIN)"
safari: clean_safari
@ echo "> Copying files to Safari extension folder..."
@ cp icons/* $(SAFARI)
@ cd src; cp amp.js ../$(SAFARI)
@ echo "$(GREEN)Safari extention is ready!$(PLAIN)"
clean: clean_chrome clean_safari
@ rm -f .DS_Store
clean_chrome:
@ echo "> Cleaning Chrome extension folder..."
@ rm -fr $(CHROME)/icons
@ rm -f $(CHROME)/amp.js $(CHROME)/background.js $(CHROME)/.DS_Store
clean_safari:
@ echo "> Cleaning Safari extension folder..."
@ rm -f $(SAFARI)/Icon*
@ rm -f $(SAFARI)/amp.js $(SAFARI)/.DS_Store
release: release_safari release_chrome
release_safari: safari
@ echo "> Building Safari release"
release_chrome: chrome
@ echo "> Building Safari release"
@ rm -rf release
@ mkdir release
@ zip -r release/chrome.zip $(CHROME)/*