Subversion Repositories Kolibri OS

Rev

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