1 #############################################################
5 #############################################################
7 LIBDRM_SOURCE
:=libdrm-
$(LIBDRM_VERSION
).
tar.bz2
8 LIBDRM_SITE
:=http
://dri.freedesktop.org
/libdrm
/
10 LIBDRM_DIR
:=$(BUILD_DIR
)/libdrm-
$(LIBDRM_VERSION
)
12 $(DL_DIR
)/$(LIBDRM_SOURCE
):
13 $(call DOWNLOAD
,$(LIBDRM_SITE
),$(LIBDRM_SOURCE
))
15 libdrm-source
: $(DL_DIR
)/$(LIBDRM_SOURCE
)
17 $(LIBDRM_DIR
)/.unpacked
: $(DL_DIR
)/$(LIBDRM_SOURCE
)
18 $(LIBDRM_CAT
) $(DL_DIR
)/$(LIBDRM_SOURCE
) |
tar -C
$(BUILD_DIR
) $(TAR_OPTIONS
) -
19 $(CONFIG_UPDATE
) $(LIBDRM_DIR
)
22 $(LIBDRM_DIR
)/.configured
: $(LIBDRM_DIR
)/.unpacked
23 (cd
$(LIBDRM_DIR
); rm -f config.cache
; \
24 $(TARGET_CONFIGURE_OPTS
) \
25 CFLAGS
="$(TARGET_CFLAGS) " \
26 LDFLAGS
="$(TARGET_LDFLAGS)" \
28 --target
=$(GNU_TARGET_NAME
) \
29 --host
=$(GNU_TARGET_NAME
) \
30 --build
=$(GNU_HOST_NAME
) \
36 --libexecdir
=/usr
/lib \
38 --datadir=/usr
/share \
39 --localstatedir
=/var \
40 --includedir=/usr
/include \
46 $(LIBDRM_DIR
)/.compiled
: $(LIBDRM_DIR
)/.configured
47 $(MAKE
) CCexe
="$(HOSTCC)" -C
$(LIBDRM_DIR
)
48 touch
$(LIBDRM_DIR
)/.compiled
50 $(STAGING_DIR
)/usr
/lib
/libdrm.so
: $(LIBDRM_DIR
)/.compiled
51 $(MAKE
) DESTDIR
=$(STAGING_DIR
) -C
$(LIBDRM_DIR
) install
52 $(SED
) "s,^libdir=.*,libdir=\'$(STAGING_DIR)/usr/lib\',g" $(STAGING_DIR
)/usr
/lib
/libdrm.la
53 #$(SED) "s,^prefix=.*,prefix=\'$(STAGING_DIR)\',g" \
54 # -e "s,^exec_prefix=.*,exec_prefix=\'$(STAGING_DIR)/usr\',g" \
55 # -e "s,^includedir=.*,includedir=\'$(STAGING_DIR)/usr/include\',g" \
56 # -e "s,^libdir=.*,libdir=\'$(STAGING_DIR)/usr/lib\',g" \
57 # $(STAGING_DIR)/usr/bin/libdrm-config
58 touch
-c
$(STAGING_DIR
)/usr
/lib
/libdrm.so
60 $(TARGET_DIR
)/usr
/lib
/libdrm.so
: $(STAGING_DIR
)/usr
/lib
/libdrm.so
61 cp
-dpf
$(STAGING_DIR
)/usr
/lib
/libdrm.so
* $(TARGET_DIR
)/usr
/lib
/
62 -$(STRIPCMD
) $(STRIP_STRIP_UNNEEDED
) $(TARGET_DIR
)/usr
/lib
/libdrm.so
64 libdrm
: uclibc host-pkgconfig
$(TARGET_DIR
)/usr
/lib
/libdrm.so
67 -$(MAKE
) DESTDIR
=$(TARGET_DIR
) CC
=$(TARGET_CC
) -C
$(LIBDRM_DIR
) uninstall
68 -$(MAKE
) -C
$(LIBDRM_DIR
) clean
73 #############################################################
75 # Toplevel Makefile options
77 #############################################################
78 ifeq ($(BR2_PACKAGE_LIBDRM
),y
)