2007-08-10 21:07:51 +02:00
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# libdrm
|
|
|
|
#
|
|
|
|
#############################################################
|
|
|
|
LIBDRM_VERSION:=2.3.0
|
|
|
|
LIBDRM_SOURCE:=libdrm-$(LIBDRM_VERSION).tar.bz2
|
|
|
|
LIBDRM_SITE:=http://dri.freedesktop.org/libdrm/
|
|
|
|
LIBDRM_CAT:=$(BZCAT)
|
|
|
|
LIBDRM_DIR:=$(BUILD_DIR)/libdrm-$(LIBDRM_VERSION)
|
|
|
|
|
|
|
|
$(DL_DIR)/$(LIBDRM_SOURCE):
|
2009-01-16 12:42:52 +01:00
|
|
|
$(call DOWNLOAD,$(LIBDRM_SITE),$(LIBDRM_SOURCE))
|
2007-08-10 21:07:51 +02:00
|
|
|
|
|
|
|
libdrm-source: $(DL_DIR)/$(LIBDRM_SOURCE)
|
|
|
|
|
|
|
|
$(LIBDRM_DIR)/.unpacked: $(DL_DIR)/$(LIBDRM_SOURCE)
|
|
|
|
$(LIBDRM_CAT) $(DL_DIR)/$(LIBDRM_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
|
2008-02-12 01:35:03 +01:00
|
|
|
$(CONFIG_UPDATE) $(LIBDRM_DIR)
|
2007-08-22 15:30:49 +02:00
|
|
|
touch $@
|
2007-08-10 21:07:51 +02:00
|
|
|
|
|
|
|
$(LIBDRM_DIR)/.configured: $(LIBDRM_DIR)/.unpacked
|
2007-08-22 15:30:49 +02:00
|
|
|
(cd $(LIBDRM_DIR); rm -f config.cache; \
|
2007-08-10 21:07:51 +02:00
|
|
|
$(TARGET_CONFIGURE_OPTS) \
|
|
|
|
CFLAGS="$(TARGET_CFLAGS) " \
|
|
|
|
LDFLAGS="$(TARGET_LDFLAGS)" \
|
2009-10-01 21:24:42 +02:00
|
|
|
./configure $(QUIET) \
|
2007-08-10 21:07:51 +02:00
|
|
|
--target=$(GNU_TARGET_NAME) \
|
|
|
|
--host=$(GNU_TARGET_NAME) \
|
|
|
|
--build=$(GNU_HOST_NAME) \
|
|
|
|
--prefix=/usr \
|
|
|
|
--exec-prefix=/usr \
|
|
|
|
--bindir=/usr/bin \
|
|
|
|
--sbindir=/usr/sbin \
|
2008-03-06 19:15:06 +01:00
|
|
|
--libdir=/usr/lib \
|
2007-08-10 21:07:51 +02:00
|
|
|
--libexecdir=/usr/lib \
|
|
|
|
--sysconfdir=/etc \
|
|
|
|
--datadir=/usr/share \
|
|
|
|
--localstatedir=/var \
|
2007-08-22 15:30:49 +02:00
|
|
|
--includedir=/usr/include \
|
2007-08-10 21:07:51 +02:00
|
|
|
--mandir=/usr/man \
|
|
|
|
--infodir=/usr/info \
|
2007-08-21 21:20:18 +02:00
|
|
|
)
|
2007-08-22 15:30:49 +02:00
|
|
|
touch $@
|
2007-08-10 21:07:51 +02:00
|
|
|
|
|
|
|
$(LIBDRM_DIR)/.compiled: $(LIBDRM_DIR)/.configured
|
|
|
|
$(MAKE) CCexe="$(HOSTCC)" -C $(LIBDRM_DIR)
|
|
|
|
touch $(LIBDRM_DIR)/.compiled
|
|
|
|
|
2008-03-06 19:15:06 +01:00
|
|
|
$(STAGING_DIR)/usr/lib/libdrm.so: $(LIBDRM_DIR)/.compiled
|
2007-08-10 21:07:51 +02:00
|
|
|
$(MAKE) DESTDIR=$(STAGING_DIR) -C $(LIBDRM_DIR) install
|
2008-03-06 19:15:06 +01:00
|
|
|
$(SED) "s,^libdir=.*,libdir=\'$(STAGING_DIR)/usr/lib\',g" $(STAGING_DIR)/usr/lib/libdrm.la
|
2007-08-10 21:07:51 +02:00
|
|
|
#$(SED) "s,^prefix=.*,prefix=\'$(STAGING_DIR)\',g" \
|
2007-08-22 14:35:41 +02:00
|
|
|
# -e "s,^exec_prefix=.*,exec_prefix=\'$(STAGING_DIR)/usr\',g" \
|
2008-03-06 19:15:06 +01:00
|
|
|
# -e "s,^includedir=.*,includedir=\'$(STAGING_DIR)/usr/include\',g" \
|
|
|
|
# -e "s,^libdir=.*,libdir=\'$(STAGING_DIR)/usr/lib\',g" \
|
2007-08-22 14:35:41 +02:00
|
|
|
# $(STAGING_DIR)/usr/bin/libdrm-config
|
2008-03-06 19:15:06 +01:00
|
|
|
touch -c $(STAGING_DIR)/usr/lib/libdrm.so
|
2007-08-10 21:07:51 +02:00
|
|
|
|
2008-03-06 19:15:06 +01:00
|
|
|
$(TARGET_DIR)/usr/lib/libdrm.so: $(STAGING_DIR)/usr/lib/libdrm.so
|
|
|
|
cp -dpf $(STAGING_DIR)/usr/lib/libdrm.so* $(TARGET_DIR)/usr/lib/
|
|
|
|
-$(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(TARGET_DIR)/usr/lib/libdrm.so
|
2007-08-10 21:07:51 +02:00
|
|
|
|
2009-10-27 23:16:44 +01:00
|
|
|
libdrm: host-pkg-config $(TARGET_DIR)/usr/lib/libdrm.so
|
2007-08-10 21:07:51 +02:00
|
|
|
|
|
|
|
libdrm-clean:
|
2008-04-01 09:03:07 +02:00
|
|
|
-$(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(LIBDRM_DIR) uninstall
|
2007-08-10 21:07:51 +02:00
|
|
|
-$(MAKE) -C $(LIBDRM_DIR) clean
|
|
|
|
|
|
|
|
libdrm-dirclean:
|
|
|
|
rm -rf $(LIBDRM_DIR)
|
|
|
|
|
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# Toplevel Makefile options
|
|
|
|
#
|
|
|
|
#############################################################
|
2008-12-08 09:15:27 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_LIBDRM),y)
|
2007-08-10 21:07:51 +02:00
|
|
|
TARGETS+=libdrm
|
|
|
|
endif
|