forked from KolibriOS/kolibrios
libnsfb builds. Enables keyboard/mouse in Netsurf
git-svn-id: svn://kolibrios.org@4823 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
6823133025
commit
cbeff23cbd
Binary file not shown.
@ -1,94 +1,10 @@
|
|||||||
# Component settings
|
# This is the makefile in kolibrios/contrib/network/netsurf/libcss
|
||||||
COMPONENT := nsfb
|
# Need to add recursive calling to all the subdirectories. For now, use the generated .a file for testing.
|
||||||
COMPONENT_VERSION := 0.0.2
|
|
||||||
# Default to a static library
|
|
||||||
COMPONENT_TYPE ?= lib-static
|
|
||||||
|
|
||||||
# Setup the tooling
|
OUTFILE := $(CURDIR)/libnsfb.a
|
||||||
#PREFIX ?= /opt/netsurf
|
|
||||||
PREFIX ?= /usr
|
|
||||||
NSSHARED ?= $(PREFIX)/share/netsurf-buildsystem
|
|
||||||
include $(NSSHARED)/makefiles/Makefile.tools
|
|
||||||
|
|
||||||
# Reevaluate when used, as BUILDDIR won't be defined yet
|
OBJS = $(wildcard src/libo.o)
|
||||||
TESTRUNNER = test/runtest.sh $(BUILDDIR) $(EXEEXT)
|
OBJS := $(OBJS) $(wildcard src/plot/libo.o)
|
||||||
|
OBJS := $(OBJS) $(wildcard src/surface/libo.o)
|
||||||
|
|
||||||
# Toolchain flags
|
include $(MENUETDEV)/makefiles/Makefile_for_lib
|
||||||
WARNFLAGS := -Wall -Wextra -Wundef -Wpointer-arith -Wcast-align \
|
|
||||||
-Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes \
|
|
||||||
-Wmissing-declarations -Wnested-externs -Werror -pedantic \
|
|
||||||
-Wno-overlength-strings # For nsglobe.c
|
|
||||||
CFLAGS := -g -std=c99 -D_BSD_SOURCE -D_POSIX_C_SOURCE=200112L \
|
|
||||||
-I$(CURDIR)/include/ -I$(CURDIR)/src $(WARNFLAGS) $(CFLAGS)
|
|
||||||
|
|
||||||
NSFB_XCB_PKG_NAMES := xcb xcb-icccm xcb-image xcb-keysyms xcb-atom
|
|
||||||
|
|
||||||
$(eval $(call pkg_config_package_available,NSFB_VNC_AVAILABLE,libvncserver))
|
|
||||||
$(eval $(call pkg_config_package_available,NSFB_SDL_AVAILABLE,sdl))
|
|
||||||
$(eval $(call pkg_config_package_available,NSFB_XCB_AVAILABLE,$(NSFB_XCB_PKG_NAMES)))
|
|
||||||
|
|
||||||
ifeq ($(NSFB_SDL_AVAILABLE),yes)
|
|
||||||
$(eval $(call pkg_config_package_add_flags,sdl,CFLAGS))
|
|
||||||
$(eval $(call pkg_config_package_add_flags,sdl,TESTCFLAGS,TESTLDFLAGS))
|
|
||||||
|
|
||||||
REQUIRED_PKGS := $(REQUIRED_PKGS) sdl
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(NSFB_XCB_AVAILABLE),yes)
|
|
||||||
# Size hint allocators were removed in xcb-icccm 0.3.0
|
|
||||||
$(eval $(call pkg_config_package_min_version,NSFB_XCB_ICCCM_SIZE_HINTS,xcb-icccm,0.3.0))
|
|
||||||
ifeq ($(NSFB_XCB_ICCCM_SIZE_HINTS),yes)
|
|
||||||
CFLAGS := $(CFLAGS) -DNSFB_NEED_HINTS_ALLOC
|
|
||||||
endif
|
|
||||||
|
|
||||||
# xcb-icccm 0.3.8 introduced an additional "icccm_" in function names
|
|
||||||
$(eval $(call pkg_config_package_min_version,NSFB_XCB_ICCCM_API_PREFIX,xcb-icccm,0.3.8))
|
|
||||||
ifeq ($(NSFB_XCB_ICCCM_API_PREFIX),yes)
|
|
||||||
CFLAGS := $(CFLAGS) -DNSFB_NEED_ICCCM_API_PREFIX
|
|
||||||
endif
|
|
||||||
|
|
||||||
# xcbproto 1.6 incorporated atoms previously found in xcb_atom
|
|
||||||
# However, libxcb <1.3 did not report xcbproto versions. Assume xcbproto 1.5 in this case.
|
|
||||||
$(eval $(call pkg_config_package_min_version,NSFB_HAVE_MODERN_XCB,xcb,1.3))
|
|
||||||
ifeq ($(NSFB_HAVE_MODERN_XCB),yes)
|
|
||||||
$(eval $(call pkg_config_get_variable,NSFB_XCBPROTO_VERSION,xcb,xcbproto_version))
|
|
||||||
NSFB_XCBPROTO_MAJOR_VERSION := $(word 1,$(subst ., ,$(NSFB_XCBPROTO_VERSION)))
|
|
||||||
NSFB_XCBPROTO_MINOR_VERSION := $(word 2,$(subst ., ,$(NSFB_XCBPROTO_VERSION)))
|
|
||||||
CFLAGS := $(CFLAGS) -DNSFB_XCBPROTO_MAJOR_VERSION=$(NSFB_XCBPROTO_MAJOR_VERSION)
|
|
||||||
CFLAGS := $(CFLAGS) -DNSFB_XCBPROTO_MINOR_VERSION=$(NSFB_XCBPROTO_MINOR_VERSION)
|
|
||||||
else
|
|
||||||
CFLAGS := $(CFLAGS) -DNSFB_XCBPROTO_MAJOR_VERSION=1
|
|
||||||
CFLAGS := $(CFLAGS) -DNSFB_XCBPROTO_MINOR_VERSION=5
|
|
||||||
endif
|
|
||||||
|
|
||||||
$(eval $(call pkg_config_package_add_flags,$(NSFB_XCB_PKG_NAMES),CFLAGS))
|
|
||||||
$(eval $(call pkg_config_package_add_flags,$(NSFB_XCB_PKG_NAMES),TESTCFLAGS,TESTLDFLAGS))
|
|
||||||
|
|
||||||
REQUIRED_PKGS := $(REQUIRED_PKGS) $(NSFB_XCB_PKG_NAMES)
|
|
||||||
|
|
||||||
$(eval $(call pkg_config_package_available,NSFB_XCB_UTIL_AVAILABLE,xcb-util))
|
|
||||||
ifeq ($(NSFB_XCB_UTIL_AVAILABLE),yes)
|
|
||||||
REQUIRED_PKGS := $(REQUIRED_PKGS) xcb-util
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(NSFB_VNC_AVAILABLE),yes)
|
|
||||||
$(eval $(call pkg_config_package_add_flags,libvncserver,CFLAGS))
|
|
||||||
$(eval $(call pkg_config_package_add_flags,libvncserver,TESTCFLAGS,TESTLDFLAGS))
|
|
||||||
|
|
||||||
REQUIRED_PKGS := $(REQUIRED_PKGS) libvncserver
|
|
||||||
endif
|
|
||||||
|
|
||||||
TESTLDFLAGS := -lm -Wl,--whole-archive -l$(COMPONENT) -Wl,--no-whole-archive $(TESTLDFLAGS)
|
|
||||||
|
|
||||||
include $(NSBUILD)/Makefile.top
|
|
||||||
|
|
||||||
# Extra installation rules
|
|
||||||
I := /include
|
|
||||||
INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):include/libnsfb.h
|
|
||||||
INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):include/libnsfb_plot.h
|
|
||||||
INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):include/libnsfb_plot_util.h
|
|
||||||
INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):include/libnsfb_event.h
|
|
||||||
INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):include/libnsfb_cursor.h
|
|
||||||
INSTALL_ITEMS := $(INSTALL_ITEMS) /lib/pkgconfig:lib$(COMPONENT).pc.in
|
|
||||||
INSTALL_ITEMS := $(INSTALL_ITEMS) /lib:$(OUTPUT)
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
# Sources
|
# Sources
|
||||||
OBJS := surface.o able.o ram.o linux.o sdl.o kolibri.o
|
OBJS := surface.o able.o ram.o linux.o kolibri.o
|
||||||
|
|
||||||
OUTFILE = sup.o
|
OUTFILE = libo.o
|
||||||
|
|
||||||
CFLAGS += -I ../../include/ -I ../../ -I ../ -I ./ -I /home/sourcerer/kos_src/newenginek/kolibri/include
|
CFLAGS += -I ../../include/ -I ../../ -I ../ -I ./ -I /home/sourcerer/kos_src/newenginek/kolibri/include
|
||||||
include $(MENUETDEV)/makefiles/Makefile_for_o_lib
|
include $(MENUETDEV)/makefiles/Makefile_for_o_lib
|
||||||
|
Loading…
Reference in New Issue
Block a user