blob: 1c6d9ffde707ec1d9912368387a5214a80c3b4bb (
plain)
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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
|
#!/bin/make
#
# Makefile for libdom
#
# Copyright 2009-2020 John-Mark Bell <jmb@netsurf-browser.org>
# Component settings
COMPONENT := dom
COMPONENT_VERSION := 0.4.1
# Default to a static library
COMPONENT_TYPE ?= lib-static
# Setup the tooling
PREFIX ?= /opt/netsurf
NSSHARED ?= $(PREFIX)/share/netsurf-buildsystem
include $(NSSHARED)/makefiles/Makefile.tools
TESTRUNNER := $(PERL) $(NSTESTTOOLS)/testrunner.pl
# Toolchain flags
WARNFLAGS := -Wall -W -Wundef -Wpointer-arith -Wcast-align \
-Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes \
-Wmissing-declarations -Wnested-externs
# BeOS/Haiku standard library headers generate warnings
ifneq ($(HOST),i586-pc-haiku)
WARNFLAGS := $(WARNFLAGS) -Werror
endif
# AmigaOS needs this to avoid warnings
ifeq ($(findstring amigaos,$(HOST)),amigaos)
CFLAGS := -U__STRICT_ANSI__ $(CFLAGS)
endif
CFLAGS := -D_BSD_SOURCE -D_DEFAULT_SOURCE \
-I$(CURDIR)/include/ -I$(CURDIR)/src -I$(CURDIR)/binding \
$(WARNFLAGS) $(CFLAGS)
# Some gcc2 versions choke on -std=c99, and it doesn't know about it anyway
ifneq ($(GCCVER),2)
CFLAGS := -std=c99 $(CFLAGS)
endif
# Parserutils & wapcaplet
ifneq ($(findstring clean,$(MAKECMDGOALS)),clean)
ifneq ($(PKGCONFIG),)
CFLAGS := $(CFLAGS) $(shell $(PKGCONFIG) libparserutils --cflags)
CFLAGS := $(CFLAGS) $(shell $(PKGCONFIG) libwapcaplet --cflags)
LDFLAGS := $(LDFLAGS) $(shell $(PKGCONFIG) libparserutils --libs)
LDFLAGS := $(LDFLAGS) $(shell $(PKGCONFIG) libwapcaplet --libs)
else
CFLAGS := $(CFLAGS) -I$(PREFIX)/include
LDFLAGS := $(LDFLAGS) -lparserutils -lwapcaplet
endif
endif
include $(NSBUILD)/Makefile.top
# Extra installation rules
Is := include/dom
I := /$(INCLUDEDIR)/dom
INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):$(Is)/dom.h;$(Is)/functypes.h;$(Is)/inttypes.h
Is := include/dom/core
I := /$(INCLUDEDIR)/dom/core
INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):$(Is)/attr.h;$(Is)/characterdata.h
INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):$(Is)/cdatasection.h
INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):$(Is)/comment.h
INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):$(Is)/doc_fragment.h
INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):$(Is)/document.h;$(Is)/document_type.h
INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):$(Is)/entity_ref.h
INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):$(Is)/element.h;$(Is)/exceptions.h
INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):$(Is)/implementation.h
INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):$(Is)/namednodemap.h;$(Is)/node.h
INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):$(Is)/nodelist.h;$(Is)/string.h
INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):$(Is)/pi.h
INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):$(Is)/text.h;$(Is)/typeinfo.h
Is := include/dom/events
I := /$(INCLUDEDIR)/dom/events
INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):$(Is)/event.h;$(Is)/ui_event.h
INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):$(Is)/custom_event.h;$(Is)/mouse_event.h
INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):$(Is)/keyboard_event.h;$(Is)/text_event.h
INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):$(Is)/mouse_wheel_event.h
INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):$(Is)/mouse_multi_wheel_event.h
INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):$(Is)/mutation_event.h;$(Is)/event_target.h
INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):$(Is)/mutation_name_event.h;$(Is)/events.h
INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):$(Is)/event_listener.h
INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):$(Is)/document_event.h
Is := include/dom/html
I := /$(INCLUDEDIR)/dom/html
INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):$(Is)/html_document.h
INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):$(Is)/html_collection.h
INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):$(Is)/html_element.h
INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):$(Is)/html_elements.h
INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):$(Is)/html_html_element.h
INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):$(Is)/html_head_element.h
INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):$(Is)/html_link_element.h
INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):$(Is)/html_title_element.h
INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):$(Is)/html_body_element.h
INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):$(Is)/html_meta_element.h
INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):$(Is)/html_form_element.h
INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):$(Is)/html_button_element.h
INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):$(Is)/html_canvas_element.h
INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):$(Is)/html_input_element.h
INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):$(Is)/html_select_element.h
INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):$(Is)/html_text_area_element.h
INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):$(Is)/html_option_element.h
INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):$(Is)/html_opt_group_element.h
INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):$(Is)/html_options_collection.h
INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):$(Is)/html_hr_element.h
INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):$(Is)/html_dlist_element.h
INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):$(Is)/html_directory_element.h
INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):$(Is)/html_menu_element.h
INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):$(Is)/html_fieldset_element.h
INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):$(Is)/html_legend_element.h
INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):$(Is)/html_div_element.h
INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):$(Is)/html_paragraph_element.h
INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):$(Is)/html_heading_element.h
INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):$(Is)/html_quote_element.h
INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):$(Is)/html_pre_element.h
INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):$(Is)/html_br_element.h
INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):$(Is)/html_label_element.h
INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):$(Is)/html_ulist_element.h
INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):$(Is)/html_olist_element.h
INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):$(Is)/html_li_element.h
INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):$(Is)/html_font_element.h
INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):$(Is)/html_mod_element.h
INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):$(Is)/html_anchor_element.h
INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):$(Is)/html_basefont_element.h
INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):$(Is)/html_image_element.h
INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):$(Is)/html_object_element.h
INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):$(Is)/html_param_element.h
INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):$(Is)/html_applet_element.h
INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):$(Is)/html_area_element.h
INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):$(Is)/html_map_element.h
INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):$(Is)/html_script_element.h
INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):$(Is)/html_tablecaption_element.h
INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):$(Is)/html_tablecell_element.h
INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):$(Is)/html_tablecol_element.h
INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):$(Is)/html_tablesection_element.h
INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):$(Is)/html_table_element.h
INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):$(Is)/html_tablerow_element.h
INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):$(Is)/html_base_element.h
INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):$(Is)/html_style_element.h
INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):$(Is)/html_frameset_element.h
INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):$(Is)/html_frame_element.h
INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):$(Is)/html_iframe_element.h
INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):$(Is)/html_isindex_element.h
INSTALL_ITEMS := $(INSTALL_ITEMS) /$(LIBDIR)/pkgconfig:lib$(COMPONENT).pc.in
INSTALL_ITEMS := $(INSTALL_ITEMS) /$(LIBDIR):$(OUTPUT)
ifeq ($(WITH_LIBXML_BINDING),yes)
REQUIRED_PKGS := $(REQUIRED_PKGS) libxml-2.0
endif
ifeq ($(WITH_HUBBUB_BINDING),yes)
REQUIRED_PKGS := $(REQUIRED_PKGS) libhubbub
endif
|