OLD | NEW |
---|---|
1 # Copyright 2015 The Chromium Authors. All rights reserved. | 1 # Copyright 2015 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 KEYCHAIN_PASSWORD=g0atMaster | 5 KEYCHAIN_PASSWORD=g0atMaster |
6 # This must match the commonName in codesign.cfg. | 6 # This must match the commonName in codesign.cfg. |
7 KEYCHAIN_IDENTITY=untrusted@goat.local | 7 KEYCHAIN_IDENTITY=untrusted@goat.local |
8 | 8 |
9 executable32: src.c | 9 executable32: src.c |
10 clang -m32 -o $@ $^ | 10 clang -m32 -o $@ $^ |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
50 security unlock-keychain -p $(KEYCHAIN_PASSWORD) \ | 50 security unlock-keychain -p $(KEYCHAIN_PASSWORD) \ |
51 $(PWD)/codesign.keychain | 51 $(PWD)/codesign.keychain |
52 codesign -s $(KEYCHAIN_IDENTITY) --keychain $(PWD)/codesign.keychain $@ | 52 codesign -s $(KEYCHAIN_IDENTITY) --keychain $(PWD)/codesign.keychain $@ |
53 | 53 |
54 signedexecutablefat: executablefat codesign.keychain | 54 signedexecutablefat: executablefat codesign.keychain |
55 cp $< $@ | 55 cp $< $@ |
56 security unlock-keychain -p $(KEYCHAIN_PASSWORD) \ | 56 security unlock-keychain -p $(KEYCHAIN_PASSWORD) \ |
57 $(PWD)/codesign.keychain | 57 $(PWD)/codesign.keychain |
58 codesign -s $(KEYCHAIN_IDENTITY) --keychain $(PWD)/codesign.keychain \ | 58 codesign -s $(KEYCHAIN_IDENTITY) --keychain $(PWD)/codesign.keychain \ |
59 $@ --all-architectures | 59 $@ --all-architectures |
60 | |
61 .PHONY: test-bundle.app | |
62 test-bundle.app: signedexecutablefat libsigned64.dylib executable32 | |
63 ditto base-bundle.app $@ | |
64 ditto $< $@/Contents/MacOS/test-bundle | |
65 ditto $(word 2,$^) $@/Contents/Frameworks/$(word 2,$^) | |
66 ditto $(word 3,$^) $@/Contents/Resources/$(word 3,$^) | |
67 security unlock-keychain -p $(KEYCHAIN_PASSWORD) \ | |
68 $(PWD)/codesign.keychain | |
69 codesign -f -s $(KEYCHAIN_IDENTITY) --keychain $(PWD)/codesign.keychain \ | |
70 $@ --all-architectures --resource-rules ResourceRules | |
71 | |
72 .PHONY: modified-bundle.app | |
73 modified-bundle.app: test-bundle.app codesign.cfg lib32.dylib executable64 | |
74 ditto $< $@ | |
75 ditto $(word 2,$^) $@/Contents/Resources/$(word 2,$^) | |
76 ditto $(word 3,$^) $@/Contents/Frameworks/libsigned64.dylib | |
77 ditto $(word 4,$^) $@/Contents/Resources/executable32 | |
78 echo "foo" >> $@/Contents/Resources/Base.lproj/MainMenu.nib | |
79 security unlock-keychain -p $(KEYCHAIN_PASSWORD) \ | |
80 $(PWD)/codesign.keychain | |
81 codesign -f -s $(KEYCHAIN_IDENTITY) --keychain $(PWD)/codesign.keychain \ | |
82 $@/Contents/Resources/Base.lproj/MainMenu.nib | |
83 | |
84 .PHONY: modified-bundle-and-exec.app | |
85 modified-bundle-and-exec.app: test-bundle.app codesign.cfg lib32.dylib \ | |
86 executable64 | |
87 ditto $< $@ | |
88 ditto $(word 2,$^) $@/Contents/Resources/$(word 2,$^) | |
89 ditto $(word 3,$^) $@/Contents/Frameworks/libsigned64.dylib | |
90 ditto $(word 4,$^) $@/Contents/Resources/executable32 | |
91 printf '\x31' | dd bs=1 seek=8097 count=1 conv=notrunc \ | |
92 of=$@/Contents/MacOS/test-bundle | |
93 | |
94 .PHONY: modified-main-exec32.app | |
95 modified-main-exec32.app: test-bundle.app | |
96 ditto $< $@ | |
97 printf '\x31' | dd bs=1 seek=8097 count=1 conv=notrunc \ | |
98 of=$@/Contents/MacOS/test-bundle | |
Robert Sesek
2015/10/08 19:20:06
nit: something's off about this line (80 cols)
Greg K
2015/10/09 17:12:01
Yes, that got messed up because Makefiles use real
| |
99 | |
100 .PHONY: modified-main-exec64.app | |
101 modified-main-exec64.app: test-bundle.app | |
102 ditto $< $@ | |
103 printf '\x31' | dd bs=1 seek=24448 count=1 conv=notrunc \ | |
104 of=$@/Contents/MacOS/test-bundle | |
OLD | NEW |