split sources lists out to their subdirectories as first step towards using core buildsystem

This commit is contained in:
Vincent Sanders 2013-03-11 17:50:12 +00:00
parent 41e4928e25
commit 95e726c7cc
12 changed files with 120 additions and 77 deletions

View File

@ -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

View File

@ -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

6
content/Makefile Normal file
View File

@ -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))

View File

@ -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

5
css/Makefile Normal file
View File

@ -0,0 +1,5 @@
# CSS sources
S_CSS := css.c dump.c internal.c select.c utils.c
S_CSS := $(addprefix css/,$(S_CSS))

19
desktop/Makefile Normal file
View File

@ -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))

View File

@ -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))

17
image/Makefile Normal file
View File

@ -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))

View File

@ -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)

10
render/Makefile Normal file
View File

@ -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))

7
utils/Makefile Normal file
View File

@ -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))

6
utils/http/Makefile Normal file
View File

@ -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))