Platform

The main Radix cross Linux repository contains build scripts of the GNU/Linux distribution.

991 Commits   6 Branches   3 Tags   |
   177         kx 
   564         kx COMPONENT_TARGETS  = $(HARDWARE_CB1X)
   177         kx 
   177         kx 
   177         kx NEED_ABS_PATH      = true
   177         kx COMPONENT_IS_3PP   = true
   177         kx 
   177         kx 
   182         kx include ../../../../../../build-system/constants.mk
   177         kx 
   177         kx 
   182         kx SOURCE_REQUIRES    = sources/hal/Mali/xf86-video-fbturbo/r3p0-04rel0
   177         kx 
   177         kx REQUIRES           = X11/X.org/xserver/xorg-server/1.16.2
   186         kx REQUIRES          += hal/ump/DX/3.0.4.0
   177         kx 
   177         kx # ======= __END_OF_REQUIRES__ =======
   177         kx 
   177         kx 
   177         kx version            = 0.4.0
   182         kx tar_bz2_archive    = $(SRC_PACKAGE_PATH)/hal/Mali/xf86-video-fbturbo/r3p0-04rel0/xf86-video-fbturbo-$(version).tar.bz2
   177         kx SRC_ARCHIVE        = $(tar_bz2_archive)
   177         kx SRC_DIR            = $(TARGET_BUILD_DIR)/xf86-video-fbturbo-$(version)
   177         kx src_dir_name       = xf86-video-fbturbo-$(version)
   177         kx src_done           = $(TARGET_BUILD_DIR)/.source_done
   177         kx 
   248         kx scripts            = $(CURDIR)/etc
   248         kx 
   177         kx PATCHES = PATCHES
   177         kx 
   177         kx build_dir          = $(TARGET_BUILD_DIR)/build
   177         kx build_target       = $(TARGET_BUILD_DIR)/.build_done
   177         kx install_target     = $(TARGET_BUILD_DIR)/.install_done
   177         kx 
   177         kx 
   177         kx ####### Targets
   177         kx 
   177         kx PKG_GROUP = xorg
   177         kx 
   177         kx #
   177         kx # *PKG_NAME & *PKG_VERSION shouldn't be a reference to value.
   177         kx #
   177         kx XORG_PKG_NAME                = xf86-video-fbturbo
   177         kx XORG_PKG_VERSION             = 0.4.0
   177         kx XORG_PKG_ARCH                = $(TOOLCHAIN)
   177         kx XORG_PKG_DISTRO_NAME         = $(DISTRO_NAME)
   177         kx XORG_PKG_DISTRO_VERSION      = $(DISTRO_VERSION)
   177         kx XORG_PKG_GROUP               = $(PKG_GROUP)
   177         kx ###                           |---handy-ruler-------------------------------|
   177         kx XORG_PKG_SHORT_DESCRIPTION   = optimized framebuffer video driver
   177         kx XORG_PKG_URL                 = $(BUG_URL)
   177         kx XORG_PKG_LICENSE             = custom
   177         kx XORG_PKG_DESCRIPTION_FILE    = $(TARGET_BUILD_DIR)/$(XORG_PKG_NAME)-pkg-description
   177         kx XORG_PKG_DESCRIPTION_FILE_IN = $(XORG_PKG_NAME)-pkg-description.in
   177         kx XORG_PKG_INSTALL_SCRIPT      = $(XORG_PKG_NAME)-pkg-install.sh
   177         kx 
   177         kx XORG_PKG         = $(CURDIR)/$(TARGET_BUILD_DIR)/$(XORG_PKG_NAME)-package
   177         kx 
   177         kx pkg_basename     = $(XORG_PKG_NAME)-$(XORG_PKG_VERSION)-$(XORG_PKG_ARCH)-$(XORG_PKG_DISTRO_NAME)-$(XORG_PKG_DISTRO_VERSION)
   177         kx 
   177         kx pkg_archive      = $(TARGET_BUILD_DIR)/$(PKG_GROUP)/$(pkg_basename).$(pkg_arch_suffix)
   177         kx pkg_signature    = $(call sign-name,$(pkg_archive))
   177         kx pkg_description  = $(call desc-name,$(pkg_archive))
   177         kx products         = $(call pkg-files,$(pkg_archive))
   177         kx 
   177         kx BUILD_TARGETS    = $(build_target)
   177         kx BUILD_TARGETS   += $(install_target)
   177         kx 
   177         kx PRODUCT_TARGETS  = $(products)
   177         kx 
   177         kx ROOTFS_TARGETS   = $(pkg_archive)
   177         kx 
   177         kx 
   182         kx include ../../../../../../build-system/core.mk
   177         kx 
   177         kx 
   177         kx env_sysroot = DESTDIR=$(XORG_PKG)
   177         kx 
   177         kx 
   177         kx extra_configure_switches  = --libdir=/usr/lib$(LIBSUFFIX)
   177         kx extra_configure_switches += --docdir=/usr/share/doc/$(src_dir_name)
   177         kx extra_configure_switches += --infodir=/usr/share/info
   177         kx extra_configure_switches += --mandir=/usr/share/man
   198         kx extra_configure_switches += --disable-dependency-tracking
   177         kx extra_configure_switches += --sysconfdir=/etc
   177         kx extra_configure_switches += --localstatedir=/var
   177         kx extra_configure_switches += --enable-shared=yes
   177         kx extra_configure_switches += --enable-static=no
   177         kx 
   177         kx 
   177         kx TARGET_LIB_RPATH = /lib$(LIBSUFFIX):/usr/lib$(LIBSUFFIX):/usr/lib/../lib$(LIBSUFFIX)
   177         kx 
   177         kx 
   177         kx ####### Dependencies
   177         kx 
   177         kx $(src_done): $(SRC_ARCHIVE) $(PATCHES_DEP)
   177         kx 	$(UNPACK_SRC_ARCHIVE)
   177         kx 	$(APPLY_PATCHES)
   177         kx 	@touch $@
   177         kx 
   177         kx $(build_target): $(src_done)
   177         kx 	@mkdir -p $(build_dir)
   177         kx 	@cd $(build_dir) && \
   177         kx 	  $(BUILD_ENVIRONMENT) ../$(src_dir_name)/configure \
   177         kx 	  --prefix=/usr               \
   177         kx 	  --build=$(BUILD)            \
   177         kx 	  --host=$(TARGET)            \
   177         kx 	  $(extra_configure_switches)
   177         kx 	@cd $(build_dir) && $(BUILD_ENVIRONMENT) $(MAKE)
   177         kx 	@touch $@
   177         kx 
   177         kx $(install_target): $(build_target)
   177         kx 	@mkdir -p $(XORG_PKG)
   267         kx 	@cd $(build_dir) && $(BUILD_ENVIRONMENT) $(MAKE) -j1 install $(env_sysroot)
   248         kx 	# ======= Install Scripts =======
   248         kx 	@mkdir -p $(XORG_PKG)/etc/X11
   248         kx 	@cp -a $(scripts)/X11/xorg.conf.fbturbo $(XORG_PKG)/etc/X11
   248         kx 	@( cd $(XORG_PKG)/etc/X11 ; \
   248         kx 	   ln -sf xorg.conf.fbturbo xorg.conf ; \
   248         kx 	 )
   177         kx 	# ======= Install Documentation =======
   177         kx 	@if [ -d $(XORG_PKG)/usr/share/man ]; then \
   177         kx 	  ( cd $(XORG_PKG)/usr/share/man ; \
   177         kx 	    for manpagedir in `find . -type d -name "man*"` ; do \
   177         kx 	      ( cd $$manpagedir ; \
   177         kx 	        for eachpage in `find . -type l -maxdepth 1` ; do \
   177         kx 	          ln -s `readlink $$eachpage`.gz $$eachpage.gz ; \
   177         kx 	          rm $$eachpage ; \
   177         kx 	        done ; \
   177         kx 	        gzip -9 *.?  ; \
   177         kx 	      ) \
   177         kx 	    done \
   177         kx 	  ) \
   177         kx 	 fi
   177         kx 	@mkdir -p $(XORG_PKG)/usr/doc/$(src_dir_name)
   177         kx 	@cp -a $(SRC_DIR)/COPYING \
   177         kx 	       $(XORG_PKG)/usr/doc/$(src_dir_name)
   177         kx 	@mkdir -p $(XORG_PKG)/usr/share/doc/$(src_dir_name)
   177         kx 	@( cd $(SRC_DIR) ; \
   177         kx 	   cp -a COPYING INSTALL README xorg.conf \
   177         kx 	         $(XORG_PKG)/usr/share/doc/$(src_dir_name) \
   177         kx 	 )
   177         kx 	@( cd $(XORG_PKG)/usr/share/doc ; \
   177         kx 	   ln -sf $(src_dir_name) $(XORG_PKG_NAME) ; \
   177         kx 	 )
   177         kx 	@( cd $(SRC_DIR) ; \
   177         kx 	   if [ -r ChangeLog ]; then \
   177         kx 	     DOCSDIR=`echo $(XORG_PKG)/usr/share/doc/$(src_dir_name)` ; \
   177         kx 	     cat ChangeLog | head -n 1000 > $$DOCSDIR/ChangeLog ; \
   177         kx 	     touch -r ChangeLog $$DOCSDIR/ChangeLog ; \
   177         kx 	   fi \
   177         kx 	 )
   177         kx 	# ======= remove toolchain path from target libtool *.la files =======
   177         kx 	@( cd $(XORG_PKG)/usr/lib$(LIBSUFFIX)/xorg/modules/drivers ; \
   177         kx 	   sed -i "s,$(TARGET_DEST_DIR),,g" fbturbo_drv.la \
   177         kx 	 )
   177         kx 	# ======= Install the same to $(TARGET_DEST_DIR) =======
   198         kx 	$(call install-into-devenv, $(XORG_PKG))
   177         kx 	# ======= tune libtool *.la search path to the target destination for development =======
   177         kx 	@( cd $(TARGET_DEST_DIR)/usr/lib$(LIBSUFFIX)/xorg/modules/drivers ; \
   177         kx 	   sed -i "s,/usr,$(TARGET_DEST_DIR)/usr,g" fbturbo_drv.la ; \
   177         kx 	   sed -i "s,L/lib,L$(TARGET_DEST_DIR)/lib,g" fbturbo_drv.la \
   177         kx 	 )
   177         kx 	# ======= Strip binaries =======
   177         kx 	@( cd $(XORG_PKG); \
   177         kx 	   find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs $(STRIP) --strip-unneeded 2> /dev/null ; \
   177         kx 	   find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs $(STRIP) --strip-unneeded 2> /dev/null ; \
   177         kx 	 )
   177         kx ifneq ($(CHRPATH),)
   177         kx 	# ======= Set RPATH/RUNPATH for target shared objects =======
   177         kx 	@( cd $(XORG_PKG)/usr/lib$(LIBSUFFIX)/xorg/modules/drivers ; \
   177         kx 	   for file in `find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs echo` ; do \
   177         kx 	     rpath=`$(CHRPATH) -l $$file 2> /dev/null | grep "R*PATH"` ; \
   177         kx 	     if echo "$$rpath" | grep -q "$(TARGET_DEST_DIR)" ; then \
   177         kx 	       $(CHRPATH) -r $(TARGET_LIB_RPATH) $$file 1> /dev/null 2> /dev/null ; \
   177         kx 	     fi ; \
   177         kx 	   done ; \
   177         kx 	 )
   177         kx endif
   177         kx 	@touch $@
   177         kx 
   177         kx $(XORG_PKG_DESCRIPTION_FILE): $(XORG_PKG_DESCRIPTION_FILE_IN)
   177         kx 	@cat $< | $(SED) -e "s/@VERSION@/$(version)/g" > $@
   177         kx 
   177         kx $(pkg_signature)   : $(pkg_archive) ;
   177         kx $(pkg_description) : $(pkg_archive) ;
   177         kx 
   177         kx $(pkg_archive): $(install_target) $(XORG_PKG_DESCRIPTION_FILE) $(XORG_PKG_INSTALL_SCRIPT)
   177         kx 	@cp $(XORG_PKG_DESCRIPTION_FILE) $(XORG_PKG)/.DESCRIPTION
   177         kx 	@cp $(XORG_PKG_INSTALL_SCRIPT) $(XORG_PKG)/.INSTALL
   177         kx 	@$(BUILD_PKG_REQUIRES) $(XORG_PKG)/.REQUIRES
   177         kx 	@echo "pkgname=$(XORG_PKG_NAME)"                            >  $(XORG_PKG)/.PKGINFO ; \
   177         kx 	 echo "pkgver=$(XORG_PKG_VERSION)"                          >> $(XORG_PKG)/.PKGINFO ; \
   177         kx 	 echo "arch=$(XORG_PKG_ARCH)"                               >> $(XORG_PKG)/.PKGINFO ; \
   177         kx 	 echo "distroname=$(XORG_PKG_DISTRO_NAME)"                  >> $(XORG_PKG)/.PKGINFO ; \
   177         kx 	 echo "distrover=$(XORG_PKG_DISTRO_VERSION)"                >> $(XORG_PKG)/.PKGINFO ; \
   177         kx 	 echo "group=$(XORG_PKG_GROUP)"                             >> $(XORG_PKG)/.PKGINFO ; \
   177         kx 	 echo "short_description=\"$(XORG_PKG_SHORT_DESCRIPTION)\"" >> $(XORG_PKG)/.PKGINFO ; \
   177         kx 	 echo "url=$(XORG_PKG_URL)"                                 >> $(XORG_PKG)/.PKGINFO ; \
   177         kx 	 echo "license=$(XORG_PKG_LICENSE)"                         >> $(XORG_PKG)/.PKGINFO
   647         kx 	@$(PSEUDO) sh -c "cd $(XORG_PKG) && chown -R root:root . && $(MAKE_PACKAGE) --linkadd yes .."