File: Makefile.am

package info (click to toggle)
gumbo-parser 0.10.1%2Bdfsg-5
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,908 kB
  • sloc: ansic: 30,320; cpp: 3,694; python: 880; makefile: 92; sh: 15
file content (96 lines) | stat: -rw-r--r-- 2,820 bytes parent folder | download | duplicates (3)
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
87
88
89
90
91
92
93
94
95
96
# Googletest magic.  Gumbo relies on Googletest for its unittests, and
# Googletest (by design) does not provide a "make install" option.  Instead,
# we'll assume you copy (or symlink) the Googletest distribution into a 'gtest'
# directory inside the main library directory, and then provide rules to build
# it automatically.  This approach (and these rules) are copied from the
# protobuf distribution.

ACLOCAL_AMFLAGS = -I m4

# Using Debian's libgtest-dev for tests
GTEST_DIR = /usr/src/gtest

tests/gtest-all.o:
	$(CXX) $(CPPFLAGS) -I$(GTEST_DIR) $(CXXFLAGS) -c \
            $(GTEST_DIR)/src/gtest-all.cc -o tests/gtest-all.o

tests/gtest_main.o:
	$(CXX) $(CPPFLAGS) -I$(GTEST_DIR) $(CXXFLAGS) -c \
            $(GTEST_DIR)/src/gtest_main.cc -o tests/gtest_main.o


gentags: src/tag.in
	@python gentags.py $<
	@gperf -LANSI-C --ignore-case -m200 $< |python genperf.py >src/tag_gperf.h

lib_LTLIBRARIES = libgumbo.la
libgumbo_la_CFLAGS = -Wall
libgumbo_la_LDFLAGS = -version-info 1:0:0 -no-undefined
libgumbo_la_SOURCES = \
				src/attribute.c \
				src/attribute.h \
				src/char_ref.c \
				src/char_ref.h \
				src/error.c \
				src/error.h \
				src/insertion_mode.h \
				src/parser.c \
				src/parser.h \
				src/string_buffer.c \
				src/string_buffer.h \
				src/string_piece.c \
				src/string_piece.h \
				src/tag.c \
				src/tag_enum.h \
				src/tag_gperf.h \
				src/tag_strings.h \
				src/tag_sizes.h \
				src/token_type.h \
				src/tokenizer.c \
				src/tokenizer.h \
				src/tokenizer_states.h \
				src/utf8.c \
				src/utf8.h \
				src/util.c \
				src/util.h \
				src/vector.c \
				src/vector.h
include_HEADERS = src/gumbo.h src/tag_enum.h

pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = gumbo.pc

check_PROGRAMS = gumbo_test
TESTS = gumbo_test
gumbo_test_CPPFLAGS = \
				-I"$(srcdir)/." \
				-I"$(srcdir)/src" \
				-I"$(srcdir)/gtest/include"
gumbo_test_SOURCES = \
				tests/attribute.cc \
				tests/char_ref.cc \
				tests/parser.cc \
				tests/string_buffer.cc \
				tests/string_piece.cc \
				tests/tokenizer.cc \
				tests/test_utils.cc \
				tests/utf8.cc \
				tests/vector.cc
gumbo_test_DEPENDENCIES = libgumbo.la
gumbo_test_LDADD = libgumbo.la

gumbo_test_DEPENDENCIES += tests/gtest-all.o tests/gtest_main.o
gumbo_test_LDADD += tests/gtest-all.o tests/gtest_main.o
gumbo_test_LDFLAGS = -pthread

noinst_PROGRAMS = clean_text find_links get_title positions_of_class benchmark serialize prettyprint
LDADD = libgumbo.la
AM_CPPFLAGS = -I"$(srcdir)/src"

clean_text_SOURCES = examples/clean_text.cc
find_links_SOURCES = examples/find_links.cc
get_title_SOURCES = examples/get_title.c
positions_of_class_SOURCES = examples/positions_of_class.cc
benchmark_SOURCES = benchmarks/benchmark.cc
serialize_SOURCES = examples/serialize.cc
prettyprint_SOURCES = examples/prettyprint.cc