source: packages/Xorg/xorg/driver/xf86-video-intel/Makefile @ 19848

Last change on this file since 19848 was 19848, checked in by lars, 6 years ago

[packages] Use include_mk

File size: 2.1 KB
Line 
1#
2# Copyright (C) 2007-2009 OpenWrt.org
3#
4# This is free software, licensed under the GNU General Public License v2.
5# See /LICENSE for more information.
6#
7# blogic@openwrt.org
8include $(TOPDIR)/rules.mk
9
10PKG_BASE_NAME:=xf86
11PKG_NAME:=xf86-video-intel
12PKG_RELEASE:=1
13PKG_VERSION:=2.9.1
14
15PKG_SOURCE_URL:=http://xorg.freedesktop.org/releases/individual/driver
16PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
17PKG_BUILD_DIR:=$(BUILD_DIR)/Xorg/${PKG_NAME}-$(PKG_VERSION)/
18PKG_BUILD_DEPENDS:=xf86driproto glproto
19
20PKG_MD5SUM:=8951d0366c16991badb7f9050556f4f3
21
22include $(INCLUDE_DIR)/package.mk
23$(call include_mk, xorg-driver.mk)
24
25define Package/xf86-video-intel
26  SECTION:=xorg-driver
27  CATEGORY:=Xorg
28  SUBMENU:=driver
29  DEPENDS:=+xserver-xorg @TARGET_x86
30  TITLE:=xf86-video-intel
31  URL:=http://xorg.freedesktop.org/
32endef
33
34define Build/InstallDev
35        DESTDIR="$(1)" $(MAKE) -C $(PKG_BUILD_DIR)/ $(MAKE_FLAGS) install
36endef
37
38EXTRA_CPPFLAGS= -I$(STAGING_DIR)/usr/include/xorg \
39                -I$(STAGING_DIR)/usr/include/X11/ \
40                -I$(STAGING_DIR)/usr/include/drm \
41                $(TARGET_CPPFLAGS)
42
43EXTRA_CFLAGS+= $(EXTRA_CPPFLAGS)
44
45acvar=$(subst -,_,$(subst .,_,$(subst /,_,$(1))))
46
47CONFIGURE_VARS +=DRI_CFLAGS="-I$(STAGING_DIR)/usr/include/X11/dri/" ac_cv_file__usr_share_sgml_X11_defs_ent=yes \
48        sdkdir=$(STAGING_DIR) 
49
50define Build/Configure
51        (cd $(PKG_BUILD_DIR)/$(CONFIGURE_PATH); \
52        if [ -x $(CONFIGURE_CMD) ]; then \
53                $(CP) $(SCRIPT_DIR)/config.{guess,sub} $(PKG_BUILD_DIR)/ && \
54                $(foreach a,dri.h sarea.h dristruct.h exa.h damage.h,export ac_cv_file_$(call acvar,$(STAGING_DIR)/usr/include/xorg/$(a))=yes;) \
55                sed -i "s|sdkdir=.*|sdkdir=$(STAGING_DIR)/usr/include/xorg|g" $(PKG_BUILD_DIR)/configure ;\
56                $(CONFIGURE_VARS) \
57                $(CONFIGURE_CMD) \
58                $(CONFIGURE_ARGS_XTRA) \
59                $(CONFIGURE_ARGS) \
60                CPPFLAGS="$(EXTRA_CPPFLAGS)" ;\
61        fi \
62        )
63endef
64
65define Build/Compile
66        make -C $(PKG_BUILD_DIR)
67        DESTDIR=$(PKG_INSTALL_DIR) $(MAKE) -C $(PKG_BUILD_DIR) $(MAKE_FLAGS) install
68        find $(PKG_INSTALL_DIR) -name *a | xargs rm -rf
69endef
70
71define Package/xf86-video-intel/install
72        $(INSTALL_DIR) $(1)/usr/lib/
73        $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/
74endef
75
76$(eval $(call BuildPackage,xf86-video-intel))
Note: See TracBrowser for help on using the repository browser.