added the initial version of the XOrg support. still lots of cleaning up that needs...
[openwrt/svn-archive/archive.git] / XOrg / lib / common.mk
1 #
2 # Copyright (C) 2007 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
8
9 PKG_SOURCE_URL:=http://xorg.freedesktop.org/releases/X11R7.2/src/lib/
10
11 _CATEGORY:=libraries
12 _DEPEND+=+xorg-headers-native +util-macros-X11R7.2
13 include ../../common.mk
14
15 define Build/Compile
16 make -C $(PKG_BUILD_DIR)
17 endef
18
19 define Build/Configure
20 (cd $(PKG_BUILD_DIR)/$(CONFIGURE_PATH); \
21 if [ -x $(CONFIGURE_CMD) ]; then \
22 $(CP) $(SCRIPT_DIR)/config.{guess,sub} $(PKG_BUILD_DIR)/ && \
23 $(CONFIGURE_VARS) \
24 $(CONFIGURE_CMD) \
25 $(CONFIGURE_ARGS_XTRA) \
26 $(CONFIGURE_ARGS) \
27 --enable-malloc0returnsnull; \
28 fi \
29 )
30 endef
31
32 define libXaw-X11R7.1/install
33 rm -f $(1)/usr/lib/libXaw.so.*
34 cd $(1)/usr/lib; ln -s libXaw7.so.7.0.0 libXaw.so.7; ln -s libXaw6.so.6.0.1 libXaw.so.6
35 endef
36
37 define Package/${PKG_NAME}/install
38 $(INSTALL_DIR) $(1)/usr/lib
39 if [ -d $(PKG_BUILD_DIR)/src/.libs/ ]; then \
40 cp -f $(PKG_BUILD_DIR)/src/.libs/lib*so* $(1)/usr/lib ; \
41 fi
42 if [ -d $(PKG_BUILD_DIR)/.libs/ ]; then \
43 cp -f $(PKG_BUILD_DIR)/.libs/lib*so* $(1)/usr/lib ; \
44 fi
45 $(call $(PKG_NAME)/install,$(1))
46 endef
47
48 define Build/InstallDev
49 DESTDIR=$(STAGING_DIR) $(MAKE) -C $(PKG_BUILD_DIR)/$(SUBPACKAGE) $(MAKE_FLAGS) install
50 rm -rf $(STAGING_DIR)/usr/lib/*.la
51 endef
52