Subversion Repositories Kolibri OS

Rev

Blame | Last modification | View Log | Download | RSS feed

  1. # Component settings
  2. COMPONENT := dom
  3. COMPONENT_VERSION := 0.0.1
  4. # Default to a static library
  5. COMPONENT_TYPE ?= lib-static
  6.  
  7. # Setup the tooling
  8. PREFIX ?= /opt/netsurf
  9. NSSHARED ?= $(PREFIX)/share/netsurf-buildsystem
  10. include $(NSSHARED)/makefiles/Makefile.tools
  11.  
  12. TESTRUNNER := $(PERL) $(NSTESTTOOLS)/testrunner.pl
  13.  
  14. # Toolchain flags
  15. WARNFLAGS := -Wall -W -Wundef -Wpointer-arith -Wcast-align \
  16.         -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes \
  17.         -Wmissing-declarations -Wnested-externs
  18. # BeOS/Haiku standard library headers generate warnings
  19. ifneq ($(TARGET),beos)
  20.   WARNFLAGS := $(WARNFLAGS) -Werror
  21. endif
  22. # AmigaOS needs this to avoid warnings
  23. ifeq ($(TARGET),amiga)
  24.   CFLAGS := -U__STRICT_ANSI__ $(CFLAGS)
  25. endif
  26. CFLAGS := -D_BSD_SOURCE -I$(CURDIR)/include/ \
  27.         -I$(CURDIR)/src -I$(CURDIR)/binding $(WARNFLAGS) $(CFLAGS)
  28. # Some gcc2 versions choke on -std=c99, and it doesn't know about it anyway
  29. ifneq ($(GCCVER),2)
  30.   CFLAGS := -std=c99 $(CFLAGS)
  31. endif
  32.  
  33. # Parserutils & wapcaplet
  34. ifneq ($(findstring clean,$(MAKECMDGOALS)),clean)
  35.   ifneq ($(PKGCONFIG),)
  36.     CFLAGS := $(CFLAGS) $(shell $(PKGCONFIG) libparserutils --cflags)
  37.     CFLAGS := $(CFLAGS) $(shell $(PKGCONFIG) libwapcaplet --cflags)
  38.     LDFLAGS := $(LDFLAGS) $(shell $(PKGCONFIG) libparserutils --libs)
  39.     LDFLAGS := $(LDFLAGS) $(shell $(PKGCONFIG) libwapcaplet --libs)
  40.   else
  41.     CFLAGS := $(CFLAGS) -I$(PREFIX)/include
  42.     LDFLAGS := $(LDFLAGS) -lparserutils -lwapcaplet
  43.   endif
  44. endif
  45.  
  46. include $(NSBUILD)/Makefile.top
  47.  
  48. # Extra installation rules
  49. Is := include/dom
  50. I := /include/dom
  51. INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):$(Is)/dom.h;$(Is)/functypes.h
  52.  
  53. Is := include/dom/core
  54. I := /include/dom/core
  55. INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):$(Is)/attr.h;$(Is)/characterdata.h
  56. INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):$(Is)/cdatasection.h
  57. INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):$(Is)/comment.h
  58. INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):$(Is)/doc_fragment.h
  59. INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):$(Is)/document.h;$(Is)/document_type.h
  60. INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):$(Is)/entity_ref.h
  61. INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):$(Is)/element.h;$(Is)/exceptions.h
  62. INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):$(Is)/implementation.h
  63. INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):$(Is)/namednodemap.h;$(Is)/node.h
  64. INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):$(Is)/nodelist.h;$(Is)/string.h
  65. INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):$(Is)/pi.h
  66. INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):$(Is)/text.h;$(Is)/typeinfo.h
  67.  
  68. Is := include/dom/events
  69. I := /include/dom/events
  70. INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):$(Is)/event.h;$(Is)/ui_event.h
  71. INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):$(Is)/custom_event.h;$(Is)/mouse_event.h
  72. INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):$(Is)/keyboard_event.h;$(Is)/text_event.h
  73. INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):$(Is)/mouse_wheel_event.h
  74. INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):$(Is)/mouse_multi_wheel_event.h
  75. INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):$(Is)/mutation_event.h;$(Is)/event_target.h
  76. INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):$(Is)/mutation_name_event.h;$(Is)/events.h
  77. INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):$(Is)/event_listener.h
  78. INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):$(Is)/document_event.h
  79.  
  80. Is := include/dom/html
  81. I := /include/dom/html
  82. INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):$(Is)/html_document.h
  83. INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):$(Is)/html_collection.h
  84. INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):$(Is)/html_element.h
  85. INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):$(Is)/html_html_element.h
  86. INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):$(Is)/html_head_element.h
  87. INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):$(Is)/html_link_element.h
  88. INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):$(Is)/html_title_element.h
  89. INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):$(Is)/html_body_element.h
  90. INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):$(Is)/html_meta_element.h
  91. INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):$(Is)/html_form_element.h
  92. INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):$(Is)/html_button_element.h
  93. INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):$(Is)/html_input_element.h
  94. INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):$(Is)/html_select_element.h
  95. INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):$(Is)/html_text_area_element.h
  96. INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):$(Is)/html_option_element.h
  97. INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):$(Is)/html_opt_group_element.h
  98.  
  99. INSTALL_ITEMS := $(INSTALL_ITEMS) /lib/pkgconfig:lib$(COMPONENT).pc.in
  100. INSTALL_ITEMS := $(INSTALL_ITEMS) /lib:$(OUTPUT)
  101.  
  102. ifeq ($(WITH_LIBXML_BINDING),yes)
  103.   REQUIRED_PKGS := $(REQUIRED_PKGS) libxml-2.0
  104. endif
  105.  
  106. ifeq ($(WITH_HUBBUB_BINDING),yes)
  107.   REQUIRED_PKGS := $(REQUIRED_PKGS) libhubbub
  108. endif
  109.  
  110.