From 95e726c7cc21c52829548340142d266cdb8f1123 Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Mon, 11 Mar 2013 17:50:12 +0000 Subject: split sources lists out to their subdirectories as first step towards using core buildsystem --- Makefile | 35 +++++++++++++++++++++- Makefile.sources | 76 ----------------------------------------------- content/Makefile | 6 ++++ content/fetchers/Makefile | 8 +++++ css/Makefile | 5 ++++ desktop/Makefile | 19 ++++++++++++ desktop/save_pdf/Makefile | 6 ++++ image/Makefile | 17 +++++++++++ javascript/Makefile | 2 ++ render/Makefile | 10 +++++++ utils/Makefile | 7 +++++ utils/http/Makefile | 6 ++++ 12 files changed, 120 insertions(+), 77 deletions(-) delete mode 100644 Makefile.sources create mode 100644 content/Makefile create mode 100644 content/fetchers/Makefile create mode 100644 css/Makefile create mode 100644 desktop/Makefile create mode 100644 desktop/save_pdf/Makefile create mode 100644 image/Makefile create mode 100644 render/Makefile create mode 100644 utils/Makefile create mode 100644 utils/http/Makefile diff --git a/Makefile b/Makefile index 7a09e6c45..f17f19ac1 100644 --- a/Makefile +++ b/Makefile @@ -468,7 +468,40 @@ include $(TARGET)/Makefile.target # General source file setup # ---------------------------------------------------------------------------- -include Makefile.sources +# Content sources +include content/Makefile + +# Content fetchers sources +include content/fetchers/Makefile + +# CSS sources +include css/Makefile + +# render sources +include render/Makefile + +# utility sources +include utils/Makefile + +# http utility sources +include utils/http/Makefile + +# Desktop sources +include desktop/Makefile + +# Javascript source +include javascript/Makefile + +# Image content handler sources +include image/Makefile + +# PDF saving sources +include desktop/save_pdf/Makefile + +# S_COMMON are sources common to all builds +S_COMMON := $(S_CONTENT) $(S_FETCHERS) $(S_CSS) $(S_RENDER) $(S_UTILS) \ + $(S_HTTP) $(S_DESKTOP) $(S_JAVASCRIPT) + # ---------------------------------------------------------------------------- # Source file setup diff --git a/Makefile.sources b/Makefile.sources deleted file mode 100644 index b7d32d67f..000000000 --- a/Makefile.sources +++ /dev/null @@ -1,76 +0,0 @@ -# -# NetSurf source file inclusion -# -# Included by main makefile -- indicates generic sources for every build. -# - -S_CONTENT := content.c content_factory.c dirlist.c fetch.c hlcache.c \ - llcache.c mimesniff.c urldb.c - -S_FETCHERS := curl.c data.c file.c about.c resource.c - -S_CSS := css.c dump.c internal.c select.c utils.c - -S_RENDER := box.c box_construct.c box_normalise.c box_textarea.c \ - font.c form.c imagemap.c layout.c list.c search.c table.c \ - textplain.c \ - html.c html_css.c html_css_fetcher.c html_script.c \ - html_interaction.c html_redraw.c html_forms.c html_object.c - -S_UTILS := base64.c corestrings.c filename.c filepath.c hashtable.c \ - libdom.c locale.c log.c messages.c nsurl.c talloc.c url.c \ - utf8.c utils.c useragent.c - -S_HTTP := challenge.c generics.c primitives.c parameter.c \ - content-disposition.c content-type.c www-authenticate.c - -S_DESKTOP := cookies.c history_global_core.c hotlist.c knockout.c \ - mouse.c options.c plot_style.c print.c search.c searchweb.c \ - scrollbar.c sslcert.c textarea.c thumbnail.c tree.c \ - tree_url_node.c version.c - -# Javascript source -include javascript/Makefile - -# S_COMMON are sources common to all builds -S_COMMON := $(addprefix content/,$(S_CONTENT)) \ - $(addprefix content/fetchers/,$(S_FETCHERS)) \ - $(addprefix css/,$(S_CSS)) \ - $(addprefix render/,$(S_RENDER)) \ - $(addprefix utils/,$(S_UTILS)) \ - $(addprefix utils/http/,$(S_HTTP)) \ - $(addprefix desktop/,$(S_DESKTOP)) \ - $(addprefix javascript/,$(S_JAVASCRIPT)) \ - $(S_JSAPI_BINDING) - -# S_IMAGE are sources related to image management -S_IMAGE_YES := image.c image_cache.c -S_IMAGE_NO := -S_IMAGE_$(NETSURF_USE_BMP) += bmp.c ico.c -S_IMAGE_$(NETSURF_USE_GIF) += gif.c -S_IMAGE_$(NETSURF_USE_JPEG) += jpeg.c -S_IMAGE_$(NETSURF_USE_MNG) += mng.c -S_IMAGE_$(NETSURF_USE_ROSPRITE) += nssprite.c -S_IMAGE_$(NETSURF_USE_PNG) += png.c -S_IMAGE_$(NETSURF_USE_NSSVG) += svg.c -S_IMAGE_$(NETSURF_USE_RSVG) += rsvg.c -S_IMAGE_$(NETSURF_USE_WEBP) += webp.c -S_IMAGE_$(NETSURF_USE_VIDEO) += video.c - -S_IMAGE := $(addprefix image/,$(S_IMAGE_YES)) - -# S_PDF are sources of the pdf plotter + the ones for paged-printing -S_PDF := pdf_plotters.c font_haru.c -S_PDF := $(addprefix desktop/save_pdf/,$(S_PDF)) - -# S_BROWSER are sources related to full browsers but are common -# between RISC OS, GTK, BeOS and AmigaOS builds -S_BROWSER := browser.c download.c frames.c history_core.c netsurf.c \ - save_complete.c save_text.c selection.c textinput.c - -S_BROWSER := $(addprefix desktop/,$(S_BROWSER)) - -# The following files depend on the testament -content/fetchers/about.c: testament utils/testament.h -desktop/version.c: testament utils/testament.h - diff --git a/content/Makefile b/content/Makefile new file mode 100644 index 000000000..557e6c787 --- /dev/null +++ b/content/Makefile @@ -0,0 +1,6 @@ +# Content sources + +S_CONTENT := content.c content_factory.c dirlist.c fetch.c hlcache.c \ + llcache.c mimesniff.c urldb.c + +S_CONTENT := $(addprefix content/,$(S_CONTENT)) \ No newline at end of file diff --git a/content/fetchers/Makefile b/content/fetchers/Makefile new file mode 100644 index 000000000..06e38e4c8 --- /dev/null +++ b/content/fetchers/Makefile @@ -0,0 +1,8 @@ +# Content fetchers sources + +S_FETCHERS := curl.c data.c file.c about.c resource.c + +S_FETCHERS := $(addprefix content/fetchers/,$(S_FETCHERS)) + +# The following files depend on the testament +content/fetchers/about.c: testament utils/testament.h diff --git a/css/Makefile b/css/Makefile new file mode 100644 index 000000000..1280d57e1 --- /dev/null +++ b/css/Makefile @@ -0,0 +1,5 @@ +# CSS sources + +S_CSS := css.c dump.c internal.c select.c utils.c + +S_CSS := $(addprefix css/,$(S_CSS)) diff --git a/desktop/Makefile b/desktop/Makefile new file mode 100644 index 000000000..b587e679e --- /dev/null +++ b/desktop/Makefile @@ -0,0 +1,19 @@ +# Sources for desktop + +S_DESKTOP := cookies.c history_global_core.c hotlist.c knockout.c \ + mouse.c options.c plot_style.c print.c search.c searchweb.c \ + scrollbar.c sslcert.c textarea.c thumbnail.c tree.c \ + tree_url_node.c version.c + +S_DESKTOP := $(addprefix desktop/,$(S_DESKTOP)) + +# version.c needs the testament +desktop/version.c: testament utils/testament.h + +# S_BROWSER are sources related to full browsers but are common +# between RISC OS, GTK, BeOS and AmigaOS builds +S_BROWSER := browser.c download.c frames.c history_core.c netsurf.c \ + save_complete.c save_text.c selection.c textinput.c + +S_BROWSER := $(addprefix desktop/,$(S_BROWSER)) + diff --git a/desktop/save_pdf/Makefile b/desktop/save_pdf/Makefile new file mode 100644 index 000000000..cf1f978e6 --- /dev/null +++ b/desktop/save_pdf/Makefile @@ -0,0 +1,6 @@ +# PDF saving sources + +# S_PDF are sources of the pdf plotter + the ones for paged-printing +S_PDF := pdf_plotters.c font_haru.c + +S_PDF := $(addprefix desktop/save_pdf/,$(S_PDF)) diff --git a/image/Makefile b/image/Makefile new file mode 100644 index 000000000..becd944cd --- /dev/null +++ b/image/Makefile @@ -0,0 +1,17 @@ +# Image content handlers sources + +# S_IMAGE are sources related to image management +S_IMAGE_YES := image.c image_cache.c +S_IMAGE_NO := +S_IMAGE_$(NETSURF_USE_BMP) += bmp.c ico.c +S_IMAGE_$(NETSURF_USE_GIF) += gif.c +S_IMAGE_$(NETSURF_USE_JPEG) += jpeg.c +S_IMAGE_$(NETSURF_USE_MNG) += mng.c +S_IMAGE_$(NETSURF_USE_ROSPRITE) += nssprite.c +S_IMAGE_$(NETSURF_USE_PNG) += png.c +S_IMAGE_$(NETSURF_USE_NSSVG) += svg.c +S_IMAGE_$(NETSURF_USE_RSVG) += rsvg.c +S_IMAGE_$(NETSURF_USE_WEBP) += webp.c +S_IMAGE_$(NETSURF_USE_VIDEO) += video.c + +S_IMAGE := $(addprefix image/,$(S_IMAGE_YES)) diff --git a/javascript/Makefile b/javascript/Makefile index bcdd68501..ac73ee716 100644 --- a/javascript/Makefile +++ b/javascript/Makefile @@ -61,3 +61,5 @@ $(eval $(foreach V,$(filter JSAPI_BINDING_%,$(.VARIABLES)),$(call convert_jsapi_ else S_JAVASCRIPT += none.c endif + +S_JAVASCRIPT := $(addprefix javascript/,$(S_JAVASCRIPT)) $(S_JSAPI_BINDING) \ No newline at end of file diff --git a/render/Makefile b/render/Makefile new file mode 100644 index 000000000..12f0314fd --- /dev/null +++ b/render/Makefile @@ -0,0 +1,10 @@ +# Render sources + +S_RENDER := box.c box_construct.c box_normalise.c box_textarea.c \ + font.c form.c imagemap.c layout.c list.c search.c table.c \ + textplain.c \ + html.c html_css.c html_css_fetcher.c html_script.c \ + html_interaction.c html_redraw.c html_forms.c html_object.c + + +S_RENDER := $(addprefix render/,$(S_RENDER)) \ No newline at end of file diff --git a/utils/Makefile b/utils/Makefile new file mode 100644 index 000000000..ed34e9557 --- /dev/null +++ b/utils/Makefile @@ -0,0 +1,7 @@ +# utils sources + +S_UTILS := base64.c corestrings.c filename.c filepath.c hashtable.c \ + libdom.c locale.c log.c messages.c nsurl.c talloc.c url.c \ + utf8.c utils.c useragent.c + +S_UTILS := $(addprefix utils/,$(S_UTILS)) \ No newline at end of file diff --git a/utils/http/Makefile b/utils/http/Makefile new file mode 100644 index 000000000..198588bd4 --- /dev/null +++ b/utils/http/Makefile @@ -0,0 +1,6 @@ +# http utils sources + +S_HTTP := challenge.c generics.c primitives.c parameter.c \ + content-disposition.c content-type.c www-authenticate.c + +S_HTTP := $(addprefix utils/http/,$(S_HTTP)) \ No newline at end of file -- cgit v1.2.3