forked from mattn/chrome-grff
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
56 lines (43 loc) · 1.02 KB
/
Makefile
File metadata and controls
56 lines (43 loc) · 1.02 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
DEST = "$(shell pwd)/chrome-grff"
ifndef CHROME
ifneq ($(windir),)
# Windows
CHROME = "$(USERPROFILE)/Local Settings/Application Data/Google/Chrome/Application/chrome.exe"
else
# Other Platform: Linux? Mac?
DEST = $(shell pwd)/chrome-grff
CHROME = $(shell which crxmake)
ifeq ($(CHROME),)
CHROME = $(shell which google-chrome)
endif
ifeq ($(CHROME),)
CHROME = $(shell which chromium-browser)
endif
ifeq ($(CHROME),)
CHROME = chrome
endif
endif
endif
SRCS = btn.gif background.html fullfeed.js fullfeed.css manifest.json
all : chrome-grff.crx
first : $(SRCS)
@-rm -rf $(DEST)
@mkdir $(DEST)
@cp $(SRCS) $(DEST)
$(CHROME) --pack-extension=$(DEST)
chrome-grff.crx : $(SRCS)
@-rm -rf $(DEST)
@mkdir $(DEST)
@cp $(SRCS) $(DEST)
$(CHROME) --pack-extension=$(DEST) --pack-extension-key=$(DEST).pem
zip: $(SRCS)
@-rm -rf chrome-grff.zip
@-rm -rf $(DEST)
@mkdir $(DEST)
@cp $(SRCS) $(DEST)
zip -r chrome-grff.zip chrome-grff
clean:
-@rm *.crx
-@rm -r $(DEST)
test:
$(CHROME) --enable-extensions --load-extension=$(DEST)/..