From 3ed0b09beb55dfd1247c57a87a13b96d3324f64b Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Wed, 24 Oct 2012 19:00:24 +0100 Subject: use generated htmldocument binding --- Makefile.sources.javascript | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 Makefile.sources.javascript (limited to 'Makefile.sources.javascript') diff --git a/Makefile.sources.javascript b/Makefile.sources.javascript new file mode 100644 index 000000000..48cd1cff4 --- /dev/null +++ b/Makefile.sources.javascript @@ -0,0 +1,40 @@ +# +# NetSurf javascript source file inclusion +# +# Included by Makefile.sources +# + +# ---------------------------------------------------------------------------- +# JSAPI binding +# ---------------------------------------------------------------------------- + +S_JSAPI_BINDING:= + +JSAPI_BINDING_htmldocument := javascript/jsapi/bindings/htmldocument.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 = window.c navigator.c console.c htmlelement.c +#htmldocument.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 -- cgit v1.2.3