Subversion Repositories Kolibri OS

Rev

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

  1. # Component settings
  2. COMPONENT := parserutils
  3. COMPONENT_VERSION := 0.1.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 -pedantic
  18. # BeOS/Haiku standard library headers create warnings.
  19. ifneq ($(TARGET),beos)
  20.   WARNFLAGS := $(WARNFLAGS) -Werror
  21. endif
  22.  
  23. CFLAGS := -D_BSD_SOURCE -I$(CURDIR)/include/ \
  24.         -I$(CURDIR)/src $(WARNFLAGS) $(CFLAGS)
  25. ifneq ($(GCCVER),2)
  26.   CFLAGS := $(CFLAGS) -std=c99
  27. else
  28.   # __inline__ is a GCCism
  29.   CFLAGS := $(CFLAGS) -Dinline="__inline__"
  30. endif
  31.  
  32. include $(NSBUILD)/Makefile.top
  33.  
  34. # Extra installation rules
  35. Is := include/parserutils
  36. I := /include/parserutils
  37. INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):$(Is)/errors.h;$(Is)/functypes.h;$(Is)/parserutils.h;$(Is)/types.h
  38.  
  39. Is := include/parserutils/charset
  40. I := /include/parserutils/charset
  41. INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):$(Is)/codec.h;$(Is)/mibenum.h;$(Is)/utf16.h;$(Is)/utf8.h
  42.  
  43. Is := include/parserutils/input
  44. I := /include/parserutils/input
  45. INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):$(Is)/inputstream.h
  46.  
  47. Is := include/parserutils/utils
  48. I := /include/parserutils/utils
  49. INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):$(Is)/buffer.h;$(Is)/stack.h;$(Is)/vector.h
  50.  
  51. INSTALL_ITEMS := $(INSTALL_ITEMS) /lib/pkgconfig:lib$(COMPONENT).pc.in
  52. INSTALL_ITEMS := $(INSTALL_ITEMS) /lib:$(OUTPUT)
  53.