Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(607)

Side by Side Diff: experimental/fiddle/Makefile

Issue 1349163003: experiment/fiddle (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 # Copyright 2015 Google Inc.
2 #
3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file.
5
6 .PHONEY: all
7 all: fiddle
8 clean:
9 git clean -fXd
10
11 PREFIX ?= $(PWD)/local
12 CXX ?= c++
13
14 CXXFLAGS += -Wall -Werror --std=c++11
mtklein 2015/09/17 13:58:22 Why do we -Wall -Werror?
15 LIBSKIA := libskia.so
16 ifeq ($(shell uname), Darwin)
17 LIBSKIA := libskia.dylib
18 endif
19
20 # These commands also put headers in $(PREFIX)/include/skia.
21 $(PREFIX)/lib/$(LIBSKIA):
22 mkdir -p build $(PREFIX)
23 cmake -DCMAKE_INSTALL_PREFIX:PATH="$(PREFIX)" -DSK_MESA:BOOL=1 \
24 -Bbuild -H../../cmake -G Ninja
25 ninja -C build skia
26 ninja -C build install
mtklein 2015/09/17 13:58:22 I'm skeptical of all these different directories a
27
28 .PHONEY: libskia
29 libskia: $(PREFIX)/lib/$(LIBSKIA)
30
31 skia.h: headers.sh $(PREFIX)/lib/$(LIBSKIA)
32 sh headers.sh > skia.h
33
34 SKIA_INCLUDES := \
35 -I $(PREFIX)/include/skia/core \
36 -I $(PREFIX)/include/skia/gpu \
37 -I $(PREFIX)/include/skia/gpu/gl \
38 -I $(PREFIX)/include/skia/effects \
39 -I $(PREFIX)/include/skia/pathops \
40 -I $(PREFIX)/include/skia/c \
41 -I $(PREFIX)/include/skia/utils
42
43 # Precompiled header
44 skia.gch: skia.h
mtklein 2015/09/17 13:58:22 Does this cut build times down significantly? I a
45 $(CXX) $(CXXFLAGS) $(SKIA_INCLUDES) -c $< -o $@
46
47 OSMesaContextHolder.o: OSMesaContextHolder.cpp OSMesaContextHolder.h
48 $(CXX) $(CXXFLAGS) -c -o $@ OSMesaContextHolder.cpp
49
50 fiddle_main.o: fiddle_main.cpp fiddle_main.h skia.gch OSMesaContextHolder.h
51 $(CXX) $(CXXFLAGS) $(SKIA_INCLUDES) -include skia.h -c -o $@ $<
mtklein 2015/09/17 13:58:22 Don't we need to name it skia.h.gch for this to wo
52
53 ################################################################################
54
55 FIDDLE_LD := -lOSMesa -Wl,-rpath -Wl,"$(PREFIX)/lib"
mtklein 2015/09/17 13:58:22 Shouldn't Skia be linked against OSMesa instead?
56
57 FIDDLE_SOURCES := draw.cpp fiddle_main.o OSMesaContextHolder.o $(PREFIX)/lib/$(L IBSKIA)
mtklein 2015/09/17 13:58:22 Why are fiddle_main and OSMesaContextHolder differ
58
59 fiddle: $(FIDDLE_SOURCES) skia.gch fiddle_main.h
60 $(CXX) $(CXXFLAGS) $(SKIA_INCLUDES) -include skia.h -o $@ $(FIDDLE_SOURC ES) $(FIDDLE_LD)
mtklein 2015/09/17 13:58:22 Ditto about skia.h.gch.
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698