1 #############################################################
3 # tinyx - a small footprint X-server for the TuxScreen
5 #############################################################
6 # Copyright (C) 2002 by Tom Walsh <Tom@OpenHardware.net>
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.
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.
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
25 ifneq ($(strip $(BR2_PACKAGE_XORG
)),y
)
26 ifeq ($(BR2_PACKAGE_TINYX_OLD
),y
)
28 #############################################################
29 # You may want to change these.
30 #############################################################
32 TINYX_APPS
:=xlsfonts
/xlsfonts xmodmap
/xmodmap
33 #xset/xset xdpyinfo/xdpyinfo xsetroot/xsetroot \
34 # xrdb/xrdb xrandr/xrandr \
35 # xhost/xhost xauth/xauth oclock/oclock xeyes/xeyes
38 TINYX_LIBS
:=ICE X11 Xext Xpm
41 #############################################################
42 # Stuff below this line shouldn't need changes.
43 # if you do change, look in rxvt & matchbox for the impact!
44 #############################################################
46 # Where resources are found.
49 TINYX_DIR
:=$(BUILD_DIR
)/xc-011010
50 TINYX_LDIR
:=$(TINYX_DIR
)/lib
51 TINYX_PROGS
:=$(TINYX_DIR
)/programs
52 TINYX_SOURCE
:=xc-011010.
tar.bz2
53 TINYX_SITE
:= http
://intimate.handhelds.org
/jacques
/
54 TINYX_CF
:=$(TINYX_DIR
)/config
/cf
56 # Some things that you may want to change.
57 TINYX_XFBDEV
:=$(TINYX_DIR
)/programs
/Xserver
/Xfbdev
59 TINYX_BINX
:=$(TARGET_DIR
)/usr
/X11R6
/bin
/
60 TINYX_LIBX
:=$(TARGET_DIR
)/usr
/lib
/
63 # These rules fetch various tinyx source files.
65 $(DL_DIR
)/$(TINYX_SOURCE
):
66 $(WGET
) -P
$(DL_DIR
) $(TINYX_SITE
)/$(TINYX_SOURCE
)
69 # rule to make sure that we have the source, and it is configured.
71 $(TINYX_DIR
)/.configure
: $(DL_DIR
)/$(TINYX_SOURCE
)
72 $(TINYX_CAT
) $(DL_DIR
)/$(TINYX_SOURCE
) |
tar -C
$(BUILD_DIR
) $(TAR_OPTIONS
) -
73 toolchain
/patch-kernel.sh
$(TINYX_DIR
) package
/tinyx
/ tinyx\
*.patch
74 $(SED
) 's:REPLACE_STAGING_DIR:$(STAGING_DIR):g' $(TINYX_CF
)/cross.def
75 $(SED
) 's:REPLACE_ARCH:$(ARCH):g' $(TINYX_CF
)/cross.def
76 $(SED
) 's:#define CcCmd.*:#define CcCmd $(TARGET_CROSS)gcc:g' $(TINYX_CF
)/cross.def
77 $(SED
) 's:#define RanlibCmd.*:#define RanlibCmd $(TARGET_CROSS)ranlib:g' $(TINYX_CF
)/cross.def
78 $(SED
) 's:#define LdCmd.*:#define LdCmd $(TARGET_CROSS)ld:g' $(TINYX_CF
)/cross.def
79 touch
$(TINYX_DIR
)/.configure
82 # Now that we have the source, build it...
84 $(TINYX_XFBDEV
): $(TINYX_DIR
)/.configure
85 rm -f
$(TINYX_BINX
)/Xfbdev
86 #make World CROSSCOMPILEFLAGS="CROSSCOMPILEDIR=<cross compiler dir>"
87 #( cd $(TINYX_DIR); $(MAKE) World CROSSCOMPILEFLAGS="CROSSCOMPILEDIR=$(STAGING_DIR)/bin" )
88 #( cd $(TINYX_DIR); $(TARGET_CONFIGURE_OPTS) $(MAKE) World )
90 #mv $(TINYX_DIR)/Makefile $(TINYX_DIR)/Makefile.xxxx
91 #echo "AS=$(TARGET_CROSS)as" > $(TINYX_DIR)/Makefile
92 #echo "LD=$(TARGET_CROSS)ld" >> $(TINYX_DIR)/Makefile
93 #echo "NM=$(TARGET_CROSS)nm" >> $(TINYX_DIR)/Makefile
94 #echo "CC=$(TARGET_CROSS)gcc" >> $(TINYX_DIR)/Makefile
95 #echo "GCC=$(TARGET_CROSS)gcc" >> $(TINYX_DIR)/Makefile
96 #echo "CXX=$(TARGET_CROSS)g++" >> $(TINYX_DIR)/Makefile
97 #echo "RANLIB=$(TARGET_CROSS)ranlib" >> $(TINYX_DIR)/Makefile
98 #echo "OBJCOPY=$(TARGET_CROSS)objcopy" >> $(TINYX_DIR)/Makefile
99 #cat $(TINYX_DIR)/Makefile.xxxx >> $(TINYX_DIR)/Makefile
100 ( cd
$(TINYX_DIR
); $(MAKE
) World
)
103 # Install x-includes and x-libraries in $(STAGING_DIR)/usr/X11R6/
104 # and add a symbolic link between /usr/bin/X11 and /usr/X11R6/bin
105 $(STAGING_DIR
)/usr
/X11R6
/lib
/libX11.so
.6.2: $(TINYX_XFBDEV
)
106 mkdir
-p
$(STAGING_DIR
)/usr
/X11R6
/lib
107 mkdir
-p
$(STAGING_DIR
)/usr
/X11R6
/include
108 cp
-fRL
$(TINYX_DIR
)/exports
/include/* $(STAGING_DIR
)/usr
/X11R6
/include/
109 cp
-fRL
$(TINYX_DIR
)/exports
/lib
/* $(STAGING_DIR
)/usr
/X11R6
/lib
/
110 ln
-s
/usr
/X11R6
/bin
$(TARGET_DIR
)/usr
/bin
/X11
113 # Once Frame Buffer is built, we install executables.
114 $(TINYX_BINX
)/Xfbdev
: $(TINYX_XFBDEV
)
115 -mkdir
$(TARGET_DIR
)/usr
/X11R6
117 for file in
$(TINYX_APPS
); do \
118 cp
-f
$(TINYX_DIR
)/programs
/$$file $(TINYX_BINX
); \
119 $(STRIPCMD
) $(TINYX_PROGS
)/$$file; \
121 cp
$(TINYX_DIR
)/programs
/Xserver
/Xfbdev
$(TINYX_BINX
)
122 $(STRIPCMD
) $(TINYX_BINX
)/Xfbdev
123 cp
-f
$(TINYX_DIR
)/startx
$(TARGET_DIR
)/bin
124 chmod a
+x
$(TARGET_DIR
)/bin
/startx
127 # After we have executables installed, install the libraries.
128 $(TINYX_LIBX
)/libX11.so
.6.2: $(TINYX_XFBDEV
)
129 for dirs in
$(TINYX_LIBS
); do \
130 file
=`find $(TINYX_LDIR)/$$dirs -type f -iname "lib$$dirs.so*"`; \
131 $(STRIPCMD
) --strip-unneeded
$$file; \
132 cp
-f
$$file $(TINYX_LIBX
); \
133 file
=`find $(TINYX_LDIR)/$$dirs -type l -iname "lib$$dirs.so*"`; \
134 cp
-pRf
$$file $(TINYX_LIBX
); \
137 tinyx
: zlib
$(STAGING_DIR
)/usr
/X11R6
/lib
/libX11.so
.6.2 \
138 $(TINYX_LIBX
)/libX11.so
.6.2 $(TINYX_BINX
)/Xfbdev
140 tinyx-source
: $(DL_DIR
)/$(TINYX_SOURCE
)
143 -rm -rf
$(TARGET_DIR
)/usr
/X11R6
144 -$(MAKE
) -C
$(TINYX_DIR
) clean
148 -rm -rf
$(TARGET_DIR
)/usr
/X11R6
149 #############################################################
151 # Toplevel Makefile options
153 #############################################################