From 7fe60435bce6595a9c58a9bfd8244d74b5320e96 Mon Sep 17 00:00:00 2001 From: Benjamin Franzke Date: Tue, 15 Jan 2013 08:46:13 +0100 Subject: Import DirectFB141_2k11R3_beta5 --- Source/DirectFB/gfxdrivers/sh772x/Makefile.kernel | 61 +++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100755 Source/DirectFB/gfxdrivers/sh772x/Makefile.kernel (limited to 'Source/DirectFB/gfxdrivers/sh772x/Makefile.kernel') diff --git a/Source/DirectFB/gfxdrivers/sh772x/Makefile.kernel b/Source/DirectFB/gfxdrivers/sh772x/Makefile.kernel new file mode 100755 index 0000000..8b6be07 --- /dev/null +++ b/Source/DirectFB/gfxdrivers/sh772x/Makefile.kernel @@ -0,0 +1,61 @@ +KERNEL_VERSION ?= $(shell uname -r) +KERNEL_MODLIB ?= /lib/modules/$(KERNEL_VERSION) +KERNEL_BUILD ?= $(SYSROOT)$(KERNEL_MODLIB)/build +KERNEL_SOURCE ?= $(SYSROOT)$(KERNEL_MODLIB)/source + +ifeq ($(shell test -L $(KERNEL_BUILD) && echo yes),yes) + KERNEL_BUILD := $(SYSROOT)$(shell readlink $(KERNEL_BUILD)) +endif + +ifeq ($(shell test -L $(KERNEL_SOURCE) && echo yes),yes) + KERNEL_SOURCE := $(SYSROOT)$(shell readlink $(KERNEL_SOURCE)) +endif + +K_VERSION := $(shell echo $(KERNEL_VERSION) | cut -d . -f 1) +K_PATCHLEVEL := $(shell echo $(KERNEL_VERSION) | cut -d . -f 2) +K_SUBLEVEL := $(shell echo $(KERNEL_VERSION) | cut -d . -f 3 | cut -d '-' -f 1) + + +DESTDIR ?= $(SYSROOT) + + +ifeq ($(DEBUG_2DG),yes) + CPPFLAGS += -DSH7722GFX_DEBUG_2DG +endif + +ifeq ($(DEBUG_JPU),yes) + CPPFLAGS += -DSH7722GFX_DEBUG_JPU +endif + +ifeq ($(shell test -e $(KERNEL_BUILD)/include/linux/autoconf.h && echo yes),yes) + AUTOCONF_H = -include $(KERNEL_BUILD)/include/linux/autoconf.h +endif + +ifeq ($(shell test -e $(KERNEL_BUILD)/include/linux/config.h && echo yes),yes) + CPPFLAGS += -DHAVE_LINUX_CONFIG_H +endif + +check-version = $(shell expr \( $(K_VERSION) \* 65536 + $(K_PATCHLEVEL) \* 256 + $(K_SUBLEVEL) \) \>= \( $(1) \* 65536 + $(2) \* 256 + $(3) \)) + +.PHONY: all install clean + +all: +ifeq ($(call check-version,2,6,24),1) + $(MAKE) -C $(KERNEL_BUILD) \ + KCPPFLAGS="$(CPPFLAGS) -I`pwd`/kernel-module" \ + SUBDIRS="`pwd`/kernel-module" modules +else + $(MAKE) -C $(KERNEL_BUILD) \ + CPPFLAGS="$(CPPFLAGS) -D__KERNEL__ -I`pwd`/kernel-module -I$(KERNEL_BUILD)/include -I$(KERNEL_SOURCE)/include $(AUTOCONF_H)" \ + SUBDIRS="`pwd`/kernel-module" modules +endif + +clean: + rm -rf kernel-module/*.*o kernel-module/.*.*o* kernel-module/*.mod.c kernel-module/.tmp_versions + +install: all + install -v -m 0755 -d $(DESTDIR)/lib/modules/$(KERNEL_VERSION)/renesas + install -v -m 0644 kernel-module/sh772x_gfx.ko $(DESTDIR)/lib/modules/$(KERNEL_VERSION)/renesas/ + + +.PHONY: all clean -- cgit