blob: db63050cf4019944fbe27ed1e89fbf4ad2840bdb (
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
|
#
# NetSurf javascript source file inclusion
#
# Included by Makefile.sources
#
# ----------------------------------------------------------------------------
# JSAPI binding
# ----------------------------------------------------------------------------
S_JSAPI_BINDING:=
JSAPI_BINDING_htmldocument := javascript/jsapi/bindings/htmldocument.bnd
JSAPI_BINDING_window := javascript/jsapi/bindings/window.bnd
# 1: input file
# 2: output file
# 3: binding name
define convert_jsapi_binding
S_JSAPI_BINDING += $(2)
$(2): $(1)
$(Q)nsgenbind -I javascript/jsapi/WebIDL/ -o $(2) $(1)
endef
# Javascript sources
ifeq ($(NETSURF_USE_JS),YES)
S_JSAPI = navigator.c console.c htmlelement.c
#htmldocument.c window.c
S_JAVASCRIPT += content.c jsapi.c $(addprefix jsapi/,$(S_JSAPI))
$(eval $(foreach V,$(filter JSAPI_BINDING_%,$(.VARIABLES)),$(call convert_jsapi_binding,$($(V)),$(OBJROOT)/$(patsubst JSAPI_BINDING_%,%,$(V)).c,$(patsubst JSAPI_BINDING_%,%,$(V))_jsapi)))
else
S_JAVASCRIPT += none.c
endif
|