2005-05-13 00:22:29 +02:00
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# xorg X Window System
|
|
|
|
#
|
|
|
|
#############################################################
|
|
|
|
|
|
|
|
ifneq ($(strip $(BR2_PACKAGE_TINYX)),y)
|
2005-06-24 11:39:45 +02:00
|
|
|
ifeq ($(strip $(BR2_PACKAGE_XORG)),y)
|
2005-05-13 00:22:29 +02:00
|
|
|
|
2005-07-15 10:39:09 +02:00
|
|
|
XORG_APPS:=xlsfonts/xlsfonts xmodmap/xmodmap xinit/startx \
|
|
|
|
xauth/xauth xinit/xinit xsetroot/xsetroot xset/xset \
|
|
|
|
xterm/xterm mkfontscale/mkfontscale mkfontdir/mkfontdir
|
2005-05-13 00:22:29 +02:00
|
|
|
|
2005-07-15 10:39:09 +02:00
|
|
|
XORG_LIBS:= Xft fontconfig freetype expat Xrender Xaw Xmu Xt \
|
|
|
|
SM ICE Xpm Xp Xext X11 Xmuu
|
2005-05-13 00:22:29 +02:00
|
|
|
|
|
|
|
#############################################################
|
|
|
|
# Stuff below this line shouldn't need changes.
|
|
|
|
# if you do change, look in rxvt & matchbox for the impact!
|
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# Where resources are found.
|
|
|
|
#
|
|
|
|
XORG_SOURCE:=X11R6.8.2-src.tar.bz2
|
|
|
|
XORG_SITE:=http://xorg.freedesktop.org/X11R6.8.2/src-single/
|
|
|
|
XORG_CAT:=bzcat
|
|
|
|
XORG_DIR:=$(BUILD_DIR)/xc
|
|
|
|
XORG_LDIR:=$(XORG_DIR)/lib
|
|
|
|
XORG_PROGS:=$(XORG_DIR)/programs
|
2005-07-15 01:34:47 +02:00
|
|
|
TARGET_BINX:=/usr/X11R6/bin/
|
|
|
|
TARGET_LIBX:=/usr/X11R6/lib/
|
2005-07-13 12:29:18 +02:00
|
|
|
XORG_BINX:=$(TARGET_DIR)$(TARGET_BINX)
|
2005-07-15 01:34:47 +02:00
|
|
|
XORG_LIBX:=$(TARGET_DIR)$(TARGET_LIBX)
|
2005-05-13 00:22:29 +02:00
|
|
|
XORG_CF:=$(XORG_DIR)/config/cf/cross.def
|
2005-09-08 02:25:27 +02:00
|
|
|
XORG_HOST_DEF:=$(XORG_DIR)/config/cf/host.def
|
2005-05-13 00:22:29 +02:00
|
|
|
|
2005-07-15 01:34:47 +02:00
|
|
|
# Install Xorg xserver
|
|
|
|
XSERVER:=Xorg
|
2005-07-13 12:29:18 +02:00
|
|
|
XORG_XSERVER:=$(XORG_DIR)/programs/Xserver/$(XSERVER)
|
|
|
|
TARGET_XSERVER:=$(XORG_BINX)/$(XSERVER)
|
2005-05-13 00:22:29 +02:00
|
|
|
|
2005-09-08 02:25:27 +02:00
|
|
|
# Check if we should use FreeType2.
|
|
|
|
ifeq ($(BR2_PACKAGE_FREETYPE),y)
|
|
|
|
HAS_FREETYPE2=YES
|
|
|
|
else
|
|
|
|
HAS_FREETYPE2=NO
|
|
|
|
endif
|
|
|
|
|
2005-05-13 00:22:29 +02:00
|
|
|
$(DL_DIR)/$(XORG_SOURCE):
|
|
|
|
$(WGET) -P $(DL_DIR) $(XORG_SITE)/$(XORG_SOURCE)
|
|
|
|
|
|
|
|
$(XORG_DIR)/.configure: $(DL_DIR)/$(XORG_SOURCE)
|
|
|
|
$(XORG_CAT) $(DL_DIR)/$(XORG_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
|
2005-06-24 10:36:13 +02:00
|
|
|
toolchain/patch-kernel.sh $(XORG_DIR) package/xorg/ xorg\*.patch
|
2005-09-08 02:25:27 +02:00
|
|
|
$(SED) 's:REPLACE_STAGING_DIR:$(STAGING_DIR):g' $(XORG_HOST_DEF)
|
|
|
|
$(SED) 's:REPLACE_HAS_FREETYPE2:$(HAS_FREETYPE2):g' $(XORG_HOST_DEF)
|
2005-07-13 09:36:40 +02:00
|
|
|
$(SED) 's:REPLACE_GCCINC_DIR:$(shell $(TARGET_CROSS)gcc -print-file-name=include):g' $(XORG_CF)
|
2005-05-13 00:22:29 +02:00
|
|
|
$(SED) 's:REPLACE_STAGING_DIR:$(STAGING_DIR):g' $(XORG_CF)
|
|
|
|
$(SED) 's:REPLACE_ARCH:$(ARCH):g' $(XORG_CF)
|
|
|
|
$(SED) 's:#define CcCmd.*:#define CcCmd $(TARGET_CROSS)gcc:g' $(XORG_CF)
|
|
|
|
$(SED) 's:#define RanlibCmd.*:#define RanlibCmd $(TARGET_CROSS)ranlib:g' $(XORG_CF)
|
|
|
|
$(SED) 's:#define LdCmd.*:#define LdCmd $(TARGET_CROSS)ld:g' $(XORG_CF)
|
2005-07-13 09:36:40 +02:00
|
|
|
$(SED) 's:#.*define.*HasPam.*YES::g' $(XORG_DIR)/config/cf/linux.cf
|
|
|
|
$(SED) 's:#.*define.*CrossCompiling.*NO:#define CrossCompiling YES:g' $(XORG_DIR)/config/cf/Imake.tmpl
|
|
|
|
$(SED) 's:#.*undef.*CrossCompileDir.*:#define CrossCompileDir$(STAGING_DIR)/bin:g' $(XORG_DIR)/config/cf/Imake.tmpl
|
2005-05-13 00:22:29 +02:00
|
|
|
touch $(XORG_DIR)/.configure
|
|
|
|
|
|
|
|
$(XORG_XSERVER): $(XORG_DIR)/.configure
|
2005-07-13 12:29:18 +02:00
|
|
|
rm -f $(TARGET_XSERVER) $(XORG_XSERVER)
|
2005-07-15 01:34:47 +02:00
|
|
|
( cd $(XORG_DIR) ; $(MAKE) World XCURSORGEN=xcursorgen MKFONTSCALE=mkfontscale )
|
2005-05-13 00:22:29 +02:00
|
|
|
|
2005-07-13 12:29:18 +02:00
|
|
|
$(TARGET_XSERVER): $(XORG_XSERVER)
|
|
|
|
-mkdir -p $(XORG_BINX)
|
2005-05-13 00:22:29 +02:00
|
|
|
for file in $(XORG_APPS) ; do \
|
|
|
|
cp -f $(XORG_DIR)/programs/$$file $(XORG_BINX) ; \
|
2005-07-15 10:39:09 +02:00
|
|
|
chmod a+x $(XORG_PROGS)/$$file ; \
|
|
|
|
$(STRIP) $(XORG_PROGS)/$$file || /bin/true ; \
|
2005-05-13 00:22:29 +02:00
|
|
|
done
|
2005-07-13 12:29:18 +02:00
|
|
|
cp $(XORG_XSERVER) $(TARGET_XSERVER)
|
|
|
|
(cd $(XORG_BINX); ln -snf $(XSERVER) X)
|
|
|
|
$(STRIP) $(TARGET_XSERVER)
|
2005-07-15 01:34:47 +02:00
|
|
|
mkdir -p $(XORG_LIBX)/modules
|
2005-07-15 09:07:44 +02:00
|
|
|
cp -LRf $(XORG_DIR)/exports/lib/modules/ $(XORG_LIBX)/
|
2005-07-15 01:34:47 +02:00
|
|
|
( cd $(XORG_DIR)/fonts ; $(MAKE) DESTDIR=$(TARGET_DIR) install XCURSORGEN=xcursorgen MKFONTSCALE=mkfontscale )
|
2005-07-15 10:39:09 +02:00
|
|
|
cp -LRf $(XORG_DIR)/fonts/bdf/misc/*.bdf $(XORG_LIBX)/X11/fonts/misc/
|
|
|
|
( cd $(XORG_LIBX)/X11/fonts/misc/; mkfontdir )
|
2005-07-15 01:34:47 +02:00
|
|
|
#( cd $(XORG_DIR) ; $(MAKE) DESTDIR=$(TARGET_DIR) install XCURSORGEN=xcursorgen MKFONTSCALE=mkfontscale )
|
|
|
|
(cd $(TARGET_DIR)/usr/bin; ln -snf $(TARGET_BINX) X11)
|
2005-05-13 00:22:29 +02:00
|
|
|
|
|
|
|
$(XORG_LIBX)/libX11.so.6.2: $(XORG_XSERVER)
|
2005-07-15 01:34:47 +02:00
|
|
|
-mkdir -p $(XORG_LIBX)
|
2005-05-13 00:22:29 +02:00
|
|
|
for dirs in $(XORG_LIBS) ; do \
|
|
|
|
file=`find $(XORG_LDIR)/$$dirs -type f -iname "lib$$dirs.so*"` ; \
|
|
|
|
$(STRIP) --strip-unneeded $$file ; \
|
|
|
|
cp -f $$file $(XORG_LIBX) ; \
|
|
|
|
file=`find $(XORG_LDIR)/$$dirs -type l -iname "lib$$dirs.so*"` ; \
|
|
|
|
cp -pRf $$file $(XORG_LIBX) ; \
|
|
|
|
done
|
2005-07-15 01:34:47 +02:00
|
|
|
(cd $(TARGET_DIR)/usr/lib; ln -snf $(TARGET_LIBX) X11)
|
|
|
|
echo "$(TARGET_LIBX)" >> $(TARGET_DIR)/etc/ld.so.conf
|
|
|
|
|
2005-05-13 00:22:29 +02:00
|
|
|
|
2005-07-13 12:29:18 +02:00
|
|
|
xorg: zlib $(XORG_LIBX)/libX11.so.6.2 $(TARGET_XSERVER)
|
2005-05-13 00:22:29 +02:00
|
|
|
|
|
|
|
xorg-source: $(DL_DIR)/$(XORG_SOURCE)
|
|
|
|
|
|
|
|
xorg-clean:
|
|
|
|
-rm -rf $(TARGET_DIR)/usr/X11R6
|
|
|
|
-$(MAKE) -C $(XORG_DIR) clean
|
|
|
|
|
|
|
|
xorg-dirclean:
|
|
|
|
-rm -rf $(XORG_DIR)
|
|
|
|
-rm -rf $(TARGET_DIR)/usr/X11R6
|
|
|
|
|
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# Toplevel Makefile options
|
|
|
|
#
|
|
|
|
#############################################################
|
|
|
|
TARGETS+=xorg
|
|
|
|
endif
|
|
|
|
endif
|