OLD | NEW |
1 # Makefile that wraps the Gyp and build steps for Unix and Mac (but not Windows) | 1 # Makefile that wraps the Gyp and build steps for Unix and Mac (but not Windows) |
2 # Uses "make" to build on Unix, and "xcodebuild" to build on Mac. | 2 # Uses "make" to build on Unix, and "xcodebuild" to build on Mac. |
3 # | 3 # |
4 # Some usage examples (tested on both Linux and Mac): | 4 # Some usage examples (tested on both Linux and Mac): |
5 # | 5 # |
6 # # Clean everything | 6 # # Clean everything |
7 # make clean | 7 # make clean |
8 # | 8 # |
9 # # Build and run tests (in Debug mode) | 9 # # Build and run tests (in Debug mode) |
10 # make tests | 10 # make tests |
(...skipping 14 matching lines...) Expand all Loading... |
25 # If you want more fine-grained control, you can run gyp and then build the | 25 # If you want more fine-grained control, you can run gyp and then build the |
26 # gyp-generated projects yourself. | 26 # gyp-generated projects yourself. |
27 # | 27 # |
28 # See http://code.google.com/p/skia/wiki/DocRoot for complete documentation. | 28 # See http://code.google.com/p/skia/wiki/DocRoot for complete documentation. |
29 | 29 |
30 BUILDTYPE ?= Debug | 30 BUILDTYPE ?= Debug |
31 CWD := $(shell pwd) | 31 CWD := $(shell pwd) |
32 ALL_TARGETS := core SampleApp bench gm tests tools | 32 ALL_TARGETS := core SampleApp bench gm tests tools |
33 | 33 |
34 ifneq (,$(findstring skia_os=android, $(GYP_DEFINES))) | 34 ifneq (,$(findstring skia_os=android, $(GYP_DEFINES))) |
| 35 ifeq (,$(findstring android_make_apk=0, $(GYP_DEFINES))) |
35 ALL_TARGETS += SkiaAndroidApp | 36 ALL_TARGETS += SkiaAndroidApp |
36 endif | 37 endif |
| 38 endif |
37 | 39 |
38 # Default target. This must be listed before all other targets. | 40 # Default target. This must be listed before all other targets. |
39 .PHONY: default | 41 .PHONY: default |
40 default: $(ALL_TARGETS) | 42 default: $(ALL_TARGETS) |
41 | 43 |
42 # As noted in http://code.google.com/p/skia/issues/detail?id=330 , building | 44 # As noted in http://code.google.com/p/skia/issues/detail?id=330 , building |
43 # multiple targets in parallel was failing. The special .NOTPARALLEL target | 45 # multiple targets in parallel was failing. The special .NOTPARALLEL target |
44 # tells gnu make not to run targets within _this_ Makefile in parallel, but the | 46 # tells gnu make not to run targets within _this_ Makefile in parallel, but the |
45 # recursively invoked Makefile within out/ _is_ allowed to run in parallel | 47 # recursively invoked Makefile within out/ _is_ allowed to run in parallel |
46 # (so you can still get some speedup that way). | 48 # (so you can still get some speedup that way). |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 else ifneq (,$(findstring Linux, $(uname))) | 102 else ifneq (,$(findstring Linux, $(uname))) |
101 $(MAKE) -C out $@ BUILDTYPE=$(BUILDTYPE) | 103 $(MAKE) -C out $@ BUILDTYPE=$(BUILDTYPE) |
102 else ifneq (,$(findstring Darwin, $(uname))) | 104 else ifneq (,$(findstring Darwin, $(uname))) |
103 rm -f out/$(BUILDTYPE) || if test -d out/$(BUILDTYPE); then echo "run 'm
ake clean' or otherwise delete out/$(BUILDTYPE)"; exit 1; fi | 105 rm -f out/$(BUILDTYPE) || if test -d out/$(BUILDTYPE); then echo "run 'm
ake clean' or otherwise delete out/$(BUILDTYPE)"; exit 1; fi |
104 xcodebuild -project out/gyp/$@.xcodeproj -configuration $(BUILDTYPE) | 106 xcodebuild -project out/gyp/$@.xcodeproj -configuration $(BUILDTYPE) |
105 ln -s $(CWD)/xcodebuild/$(BUILDTYPE) out/$(BUILDTYPE) | 107 ln -s $(CWD)/xcodebuild/$(BUILDTYPE) out/$(BUILDTYPE) |
106 else | 108 else |
107 echo "unknown platform $(uname)" | 109 echo "unknown platform $(uname)" |
108 exit 1 | 110 exit 1 |
109 endif | 111 endif |
OLD | NEW |