Subversion Repositories Kolibri OS

Rev

Go to most recent revision | Blame | Last modification | View Log | Download | RSS feed

  1. # Component settings
  2. COMPONENT := wapcaplet
  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. # Reevaluate when used, as BUILDDIR won't be defined yet
  13. TESTRUNNER = $(BUILDDIR)/test_testrunner$(EXEEXT)
  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 issue warnings
  20. ifneq ($(TARGET),beos)
  21.   WARNFLAGS := $(WARNFLAGS) -Werror
  22. endif
  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. ifeq ($(WANT_TEST),yes)
  35.   ifneq ($(PKGCONFIG),)
  36.     TESTCFLAGS := $(TESTCFLAGS) $(shell $(PKGCONFIG) --cflags check)
  37.     TESTLDFLAGS := $(TESTLDFLAGS) $(shell $(PKGCONFIG) --libs check)
  38.   else
  39.     TESTLDFLAGS := $(TESTLDFLAGS) -lcheck
  40.   endif
  41. endif
  42.  
  43. # Extra installation rules
  44. I := /include/libwapcaplet
  45. INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):include/libwapcaplet/libwapcaplet.h
  46. INSTALL_ITEMS := $(INSTALL_ITEMS) /lib/pkgconfig:lib$(COMPONENT).pc.in
  47. INSTALL_ITEMS := $(INSTALL_ITEMS) /lib:$(OUTPUT)
  48.