2011-06-07 14:48:41 +00:00
|
|
|
# Makefile that redirects almost all make directives to the gyp-generated Makefile.
|
|
|
|
#
|
|
|
|
# Note that this method of building works only on Unix (not Mac or Windows).
|
|
|
|
# See http://code.google.com/p/skia/wiki/DocRoot for complete documentation.
|
2009-01-16 16:15:37 +00:00
|
|
|
|
2011-06-07 14:48:41 +00:00
|
|
|
# Directory within which we want all generated files to be written.
|
|
|
|
outdir := out
|
2010-12-23 15:00:45 +00:00
|
|
|
|
2011-06-07 14:48:41 +00:00
|
|
|
# GYP-generated Makefiles only work on Linux/Unix (not Mac or Windows).
|
|
|
|
uname := $(shell uname)
|
|
|
|
ifneq (,$(findstring Darwin, $(uname)))
|
|
|
|
$(error Cannot build using Make on Mac. See http://code.google.com/p/skia/wiki/GettingStartedOnMac)
|
2010-09-24 22:25:30 +00:00
|
|
|
endif
|
2011-06-07 14:48:41 +00:00
|
|
|
ifneq (,$(findstring CYGWIN, $(uname)))
|
|
|
|
$(error Cannot build using Make on Windows. See http://code.google.com/p/skia/wiki/GettingStartedOnWindows)
|
2009-10-30 18:50:23 +00:00
|
|
|
endif
|
|
|
|
|
2011-06-07 14:48:41 +00:00
|
|
|
# Default target. This must be listed before all other targets.
|
|
|
|
.PHONY: default
|
|
|
|
default: all
|
2009-06-23 17:13:30 +00:00
|
|
|
|
2009-01-21 15:07:03 +00:00
|
|
|
.PHONY: clean
|
2009-01-16 16:15:37 +00:00
|
|
|
clean:
|
2011-06-07 14:48:41 +00:00
|
|
|
rm -rf $(outdir)
|
|
|
|
|
|
|
|
# Any target OTHER than clean...
|
|
|
|
# Ask gyp to create the real Makefile, and then pass control to it.
|
|
|
|
%:
|
|
|
|
./gyp_skia -f make
|
|
|
|
make -C $(outdir) $@
|
|
|
|
|
|
|
|
# Unfortunately, this is a bit ugly, but necessary.
|
|
|
|
# If there are any files/directories within the same directory as this Makefile
|
|
|
|
# which share the same name as a target ("tests", for example), then make
|
|
|
|
# will refuse to rebuild those targets because the file already exists.
|
|
|
|
local_filenames := $(shell ls)
|
|
|
|
.PHONY: $(local_filenames)
|
|
|
|
$(local_filenames)::
|
|
|
|
./gyp_skia -f make
|
|
|
|
make -C $(outdir) $@
|