6c57e881fb93535828b8bcaba437d6e82c677aaa
[openwrt.git] / obsolete-buildroot / make / tinyx.mk
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
27 TINYX_APPS:=xlsfonts/xlsfonts xmodmap/xmodmap
28 #xset/xset xdpyinfo/xdpyinfo xsetroot/xsetroot \
29 # xrdb/xrdb xrandr/xrandr \
30 # xhost/xhost xauth/xauth oclock/oclock xeyes/xeyes
31 #
32
33 TINYX_LIBS:=ICE X11 Xext Xpm
34 # Xaw SM Xt Xmu
35
36 #############################################################
37 # Stuff below this line shouldn't need changes.
38 # if you do change, look in rxvt & matchbox for the impact!
39 #############################################################
40 #
41 # Where resources are found.
42 #
43 TINYX_DIR:=$(BUILD_DIR)/xc-011010
44 TINYX_LDIR:=$(TINYX_DIR)/lib
45 TINYX_PROGS:=$(TINYX_DIR)/programs
46 TINYX_PATCH:=$(SOURCE_DIR)/tinyx-011010.patch
47 TINYX_SOURCE:=xc-011010.tar.bz2
48 TINYX_SITE:= http://intimate.handhelds.org/jacques/
49 TINYX_CF:=$(TINYX_DIR)/config/cf
50 #
51 # Some things that you may want to change.
52 #
53 TINYX_XFBDEV:=$(TINYX_DIR)/programs/Xserver/Xfbdev
54 TINYX_CAT:=bzcat
55 TINYX_BINX:=$(TARGET_DIR)/usr/X11R6/bin/
56 TINYX_LIBX:=$(TARGET_DIR)/usr/lib/
57
58 #
59 # These rules fetch various tinyx source files.
60 #
61 $(DL_DIR)/$(TINYX_SOURCE):
62 $(WGET) -P $(DL_DIR) $(TINYX_SITE)/$(TINYX_SOURCE)
63
64 $(DL_DIR)/cross.def:
65 $(WGET) -P $(DL_DIR) $(TINYX_SITE)/xcompile/tuxscreen/cross.def
66
67 $(DL_DIR)/host.def:
68 $(WGET) -P $(DL_DIR) $(TINYX_SITE)/xcompile/tuxscreen/host.def
69
70 #
71 # rule to make sure that we have the source, and it is configured.
72 #
73 $(TINYX_DIR)/.configure: $(DL_DIR)/$(TINYX_SOURCE) $(DL_DIR)/cross.def $(DL_DIR)/host.def
74 $(TINYX_CAT) $(DL_DIR)/$(TINYX_SOURCE) | tar -C $(BUILD_DIR) -xvf -
75 cat $(TINYX_PATCH) | patch -d $(TINYX_DIR) -p1
76 cp $(DL_DIR)/host.def $(TINYX_CF)/host.def
77 cp $(DL_DIR)/cross.def $(TINYX_CF)/cross.def
78 $(SED) 's:REPLACE_STAGING_DIR:$(STAGING_DIR):g' \
79 $(TINYX_CF)/cross.def \
80 $(TINYX_LDIR)/X11/Xlib.h
81 touch $(TINYX_DIR)/.configure
82
83 #
84 # Now that we have the source, build it...
85 #
86 $(TINYX_XFBDEV): $(TINYX_DIR)/.configure
87 rm -f $(TINYX_BINX)/Xfbdev
88 ( cd $(TINYX_DIR) ; $(MAKE) World ; cd $(BUILDROOT) )
89
90 #
91 # Once Frame Buffer is built, we install executables.
92 #
93 $(TINYX_BINX)/Xfbdev: $(TINYX_XFBDEV)
94 -mkdir $(TARGET_DIR)/usr/X11R6
95 -mkdir $(TINYX_BINX)
96 for file in $(TINYX_APPS) ; do \
97 cp -f $(TINYX_DIR)/programs/$$file $(TINYX_BINX) ; \
98 $(STRIP) $(TINYX_PROGS)/$$file ; \
99 done
100 cp $(TINYX_DIR)/programs/Xserver/Xfbdev $(TINYX_BINX)
101 $(STRIP) $(TINYX_BINX)/Xfbdev
102 cp -f $(TINYX_DIR)/startx $(TARGET_DIR)/bin
103 chmod a+x $(TARGET_DIR)/bin/startx
104
105 #
106 # After we have executables installed, install the libraries.
107 #
108 $(TINYX_LIBX)/libX11.so.6.2: $(TINYX_XFBDEV)
109 for dirs in $(TINYX_LIBS) ; do \
110 file=`find $(TINYX_LDIR)/$$dirs -type f -iname "lib$$dirs.so*"` ; \
111 $(STRIP) --strip-unneeded $$file ; \
112 cp -f $$file $(TINYX_LIBX) ; \
113 file=`find $(TINYX_LDIR)/$$dirs -type l -iname "lib$$dirs.so*"` ; \
114 cp -pRf $$file $(TINYX_LIBX) ; \
115 done
116
117 tinyx: zlib $(TINYX_LIBX)/libX11.so.6.2 $(TINYX_BINX)/Xfbdev
118
119 tinyx-source: $(DL_DIR)/$(TINYX_SOURCE)
120
121 tinyx-clean:
122 -rm -rf $(TARGET_DIR)/usr/X11R6
123 -$(MAKE) -C $(TINYX_DIR) clean
124
125 tinyx-dirclean:
126 -rm -rf $(TINYX_DIR)
127 -rm -rf $(TARGET_DIR)/usr/X11R6
This page took 0.039742 seconds and 3 git commands to generate.