tinyx.mk 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. #############################################################
  2. #
  3. # tinyx - a small footprint X-server for the TuxScreen
  4. #
  5. #############################################################
  6. # Copyright (C) 2002 by Tom Walsh <Tom@OpenHardware.net>
  7. #
  8. # This program is free software; you can redistribute it and/or modify
  9. # it under the terms of the GNU Library General Public License as
  10. # published by the Free Software Foundation; either version 2 of the
  11. # License, or (at your option) any later version.
  12. #
  13. # This program is distributed in the hope that it will be useful, but
  14. # WITHOUT ANY WARRANTY; without even the implied warranty of
  15. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  16. # Library General Public License for more details.
  17. #
  18. # You should have received a copy of the GNU Library General Public
  19. # License along with this program; if not, write to the Free Software
  20. # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
  21. # USA
  22. #
  23. #############################################################
  24. # You may want to change these.
  25. #############################################################
  26. TINYX_APPS:=xlsfonts/xlsfonts xmodmap/xmodmap
  27. #xset/xset xdpyinfo/xdpyinfo xsetroot/xsetroot \
  28. # xrdb/xrdb xrandr/xrandr \
  29. # xhost/xhost xauth/xauth oclock/oclock xeyes/xeyes
  30. #
  31. TINYX_LIBS:=ICE X11 Xext Xpm
  32. # Xaw SM Xt Xmu
  33. #############################################################
  34. # Stuff below this line shouldn't need changes.
  35. # if you do change, look in rxvt & matchbox for the impact!
  36. #############################################################
  37. #
  38. # Where resources are found.
  39. #
  40. TINYX_DIR:=$(BUILD_DIR)/xc-011010
  41. TINYX_LDIR:=$(TINYX_DIR)/lib
  42. TINYX_PROGS:=$(TINYX_DIR)/programs
  43. TINYX_SOURCE:=xc-011010.tar.bz2
  44. TINYX_SITE:= http://intimate.handhelds.org/jacques/
  45. TINYX_CF:=$(TINYX_DIR)/config/cf
  46. #
  47. # Some things that you may want to change.
  48. TINYX_XFBDEV:=$(TINYX_DIR)/programs/Xserver/Xfbdev
  49. TINYX_CAT:=bzcat
  50. TINYX_BINX:=$(TARGET_DIR)/usr/X11R6/bin/
  51. TINYX_LIBX:=$(TARGET_DIR)/usr/lib/
  52. #
  53. # These rules fetch various tinyx source files.
  54. #
  55. $(DL_DIR)/$(TINYX_SOURCE):
  56. $(WGET) -P $(DL_DIR) $(TINYX_SITE)/$(TINYX_SOURCE)
  57. $(DL_DIR)/cross.def:
  58. $(WGET) -P $(DL_DIR) $(TINYX_SITE)/xcompile/tuxscreen/cross.def
  59. $(SED) 's:arm-uclibc-:$(ARCH)-linux-uclibc-:g' $(DL_DIR)/cross.def
  60. $(DL_DIR)/host.def:
  61. $(WGET) -P $(DL_DIR) $(TINYX_SITE)/xcompile/tuxscreen/host.def
  62. #
  63. # rule to make sure that we have the source, and it is configured.
  64. #
  65. $(TINYX_DIR)/.configure: $(DL_DIR)/$(TINYX_SOURCE) $(DL_DIR)/cross.def $(DL_DIR)/host.def
  66. $(TINYX_CAT) $(DL_DIR)/$(TINYX_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
  67. toolchain/patch-kernel.sh $(TINYX_DIR) package/tinyx/ tinyx*.patch
  68. cp $(DL_DIR)/host.def $(TINYX_CF)/host.def
  69. cp $(DL_DIR)/cross.def $(TINYX_CF)/cross.def
  70. $(SED) 's,arm-uclibc-,$(ARCH)-linux-uclibc-,g' $(TINYX_CF)/cross.def
  71. $(SED) 's:REPLACE_STAGING_DIR:$(STAGING_DIR):g' \
  72. $(TINYX_CF)/cross.def \
  73. $(TINYX_LDIR)/X11/Xlib.h
  74. touch $(TINYX_DIR)/.configure
  75. #
  76. # Now that we have the source, build it...
  77. #
  78. $(TINYX_XFBDEV): $(TINYX_DIR)/.configure
  79. rm -f $(TINYX_BINX)/Xfbdev
  80. ( cd $(TINYX_DIR) ; $(MAKE) World ; cd $(BUILDROOT) )
  81. #
  82. # Once Frame Buffer is built, we install executables.
  83. #
  84. $(TINYX_BINX)/Xfbdev: $(TINYX_XFBDEV)
  85. -mkdir $(TARGET_DIR)/usr/X11R6
  86. -mkdir $(TINYX_BINX)
  87. for file in $(TINYX_APPS) ; do \
  88. cp -f $(TINYX_DIR)/programs/$$file $(TINYX_BINX) ; \
  89. $(STRIP) $(TINYX_PROGS)/$$file ; \
  90. done
  91. cp $(TINYX_DIR)/programs/Xserver/Xfbdev $(TINYX_BINX)
  92. $(STRIP) $(TINYX_BINX)/Xfbdev
  93. cp -f $(TINYX_DIR)/startx $(TARGET_DIR)/bin
  94. chmod a+x $(TARGET_DIR)/bin/startx
  95. #
  96. # After we have executables installed, install the libraries.
  97. #
  98. $(TINYX_LIBX)/libX11.so.6.2: $(TINYX_XFBDEV)
  99. for dirs in $(TINYX_LIBS) ; do \
  100. file=`find $(TINYX_LDIR)/$$dirs -type f -iname "lib$$dirs.so*"` ; \
  101. $(STRIP) --strip-unneeded $$file ; \
  102. cp -f $$file $(TINYX_LIBX) ; \
  103. file=`find $(TINYX_LDIR)/$$dirs -type l -iname "lib$$dirs.so*"` ; \
  104. cp -pRf $$file $(TINYX_LIBX) ; \
  105. done
  106. tinyx: zlib $(TINYX_LIBX)/libX11.so.6.2 $(TINYX_BINX)/Xfbdev
  107. tinyx-source: $(DL_DIR)/$(TINYX_SOURCE)
  108. tinyx-clean:
  109. -rm -rf $(TARGET_DIR)/usr/X11R6
  110. -$(MAKE) -C $(TINYX_DIR) clean
  111. tinyx-dirclean:
  112. -rm -rf $(TINYX_DIR)
  113. -rm -rf $(TARGET_DIR)/usr/X11R6
  114. #############################################################
  115. #
  116. # Toplevel Makefile options
  117. #
  118. #############################################################
  119. ifeq ($(strip $(BR2_PACKAGE_TINYX)),y)
  120. TARGETS+=tinyx
  121. endif