forked from servo/rust-harfbuzz
/
Makefile.in
86 lines (69 loc) · 1.82 KB
/
Makefile.in
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
VPATH=%VPATH%
RUSTC ?= rustc
RUSTFLAGS ?=
UNAME=$(shell uname)
ifeq ($(UNAME),Darwin)
OSTYPE=darwin
endif
ifeq ($(UNAME),Linux)
OSTYPE=linux
endif
ifeq ($(CFG_OSTYPE),linux-androideabi)
OSTYPE=android
endif
RUST_SRC = $(shell find $(VPATH)/. -type f -name '*.rs')
C_SRC = \
harfbuzz/src/hb-blob.cc \
harfbuzz/src/hb-buffer.cc \
harfbuzz/src/hb-common.cc \
harfbuzz/src/hb-fallback-shape.cc \
harfbuzz/src/hb-font.cc \
harfbuzz/src/hb-ot-layout.cc \
harfbuzz/src/hb-ot-map.cc \
harfbuzz/src/hb-ot-shape.cc \
harfbuzz/src/hb-ot-shape-complex-arabic.cc \
harfbuzz/src/hb-ot-shape-complex-indic.cc \
harfbuzz/src/hb-ot-shape-complex-misc.cc \
harfbuzz/src/hb-ot-shape-normalize.cc \
harfbuzz/src/hb-ot-shape-fallback.cc \
harfbuzz/src/hb-ot-tag.cc \
harfbuzz/src/hb-set.cc \
harfbuzz/src/hb-shape.cc \
harfbuzz/src/hb-shape-plan.cc \
harfbuzz/src/hb-shaper.cc \
harfbuzz/src/hb-tt-font.cc \
harfbuzz/src/hb-unicode.cc \
harfbuzz/src/hb-warning.cc \
$(NULL)
HBFLAGS = -DHAVE_OT
ifeq ($(OSTYPE),darwin)
endif
ifeq ($(OSTYPE),linux)
C_SRC += \
harfbuzz/src/hb-ft.cc \
harfbuzz/src/hb-glib.cc \
harfbuzz/src/hb-gobject-structs.cc \
$(NULL)
CFLAGS += $(shell pkg-config --cflags glib-2.0 freetype2)
HBFLAGS += -DHAVE_GLIB
endif
ifeq ($(OSTYPE),android)
endif
C_OBJS = $(patsubst %.cc,%.o,$(C_SRC))
CFLAGS += -I$(VPATH)/harfbuzz/src $(HBFLAGS) -fPIC
.PHONY: all
all: libharfbuzz.dummy
libharfbuzz.a: $(C_OBJS)
$(AR) rcs $@ $^
harfbuzz/src/%.o: harfbuzz/src/%.cc
$(CC) $(CFLAGS) -o $@ -c $<
libharfbuzz.dummy: harfbuzz.rc $(RUST_SRC) libharfbuzz.a
$(RUSTC) $(RUSTFLAGS) $< --out-dir .
touch $@
harfbuzz-test: harfbuzz.rc $(RUST_SRC) libharfbuzz.a
$(RUSTC) $(RUSTFLAGS) $< -o $@ --test
check: harfbuzz-test
./harfbuzz-test
.PHONY: clean
clean:
rm -f harfbuzz-test *.so *.dylib *.dll *.dummy harfbuzz/src/*.o