10615a38c3223396cf78ffb19d98d6c1f21dfb3a
[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
14 include ../../common.mk
15
16 ifeq ("$(PKG_NAME)","libX11-X11R7.2")
17 CONFIGURE_ARGS_XTRA=--without-xcb
18 endif
19
20 define libX11-X11R7.2/Compile
21 $(MAKE_VARS) \
22 $(MAKE) -C $(PKG_BUILD_DIR)/src/util CFLAGS="" LDFLAGS="" CC="cc" makekeys
23 endef
24
25 define libXt-X11R7.2/Compile
26 $(MAKE_VARS) \
27 $(MAKE) -C $(PKG_BUILD_DIR)/util CFLAGS="" LDFLAGS="" CC="cc"
28 endef
29
30 define Build/Compile
31 $(call $(PKG_NAME)/Compile)
32 make -C $(PKG_BUILD_DIR)
33 mkdir -p $(PKG_INSTALL_DIR)
34 DESTDIR=$(PKG_INSTALL_DIR) $(MAKE) -C $(PKG_BUILD_DIR) $(MAKE_FLAGS) install
35 endef
36
37 define Build/Configure
38 (cd $(PKG_BUILD_DIR)/$(CONFIGURE_PATH); \
39 if [ -x $(CONFIGURE_CMD) ]; then \
40 $(CP) $(SCRIPT_DIR)/config.{guess,sub} $(PKG_BUILD_DIR)/ && \
41 $(CONFIGURE_VARS) \
42 $(CONFIGURE_CMD) \
43 $(CONFIGURE_ARGS_XTRA) \
44 $(CONFIGURE_ARGS) \
45 --enable-malloc0returnsnull; \
46 fi \
47 )
48 endef
49
50 define Package/$(PKG_NAME)/install/Default
51 $(INSTALL_DIR) $(1)/usr/lib
52 find $(PKG_INSTALL_DIR)/usr/lib/ -name lib*so* | $(XARGS) -i -t cp -P {} $(1)/usr/lib
53 endef
54
55 define Package/$(PKG_NAME)/install
56 $(call Package/$(PKG_NAME)/install/Default,$(1))
57 endef
58
59 define Package/libXaw-X11R7.1/install
60 $(call Package/$(PKG_NAME)/install/Default,$(1))
61 cd $(1)/usr/lib; rm -f libXaw.so.7 libXaw.so.6; ln -s libXaw7.so.7.0.0 libXaw.so.7; ln -s libXaw6.so.6.0.1 libXaw.so.6
62 endef
63
64 define Build/InstallDev
65 DESTDIR=$(STAGING_DIR) $(MAKE) -C $(PKG_BUILD_DIR) $(MAKE_FLAGS) install
66 rm -rf $(STAGING_DIR)/usr/lib/*.la
67 endef
68