]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blame - lfs/glibc
HinzugefĆ¼gt:
[people/pmueller/ipfire-2.x.git] / lfs / glibc
CommitLineData
cd1a2927
MT
1###############################################################################
2# This file is part of the IPCop Firewall. #
3# #
4# IPCop is free software; you can redistribute it and/or modify #
5# it under the terms of the GNU General Public License as published by #
6# the Free Software Foundation; either version 2 of the License, or #
7# (at your option) any later version. #
8# #
9# IPCop is distributed in the hope that it will be useful, #
10# but WITHOUT ANY WARRANTY; without even the implied warranty of #
11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
12# GNU General Public License for more details. #
13# #
14# You should have received a copy of the GNU General Public License #
15# along with IPCop; if not, write to the Free Software #
16# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #
17# #
18# Makefiles are based on LFSMake, which is #
19# Copyright (C) 2002 Rod Roard <rod@sunsetsystems.com> #
20# #
21# Modifications by: #
22# ??-12-2003 Mark Wormgoor < mark@wormgoor.com> #
23# - Modified Makefile for IPCop build #
24# #
25# $Id: glibc,v 1.17.2.12 2005/02/05 15:38:15 gespinasse Exp $
26# #
27###############################################################################
28
29###############################################################################
30# Definitions
31###############################################################################
32
33include Config
34
35VER = 2.3.3
36
37THISAPP = glibc-$(VER)-lfs-5.1
38DL_FILE = $(THISAPP).tar.bz2
39DL_FROM = $(URL_LFS_FTP)
40DIR_APP = $(DIR_SRC)/$(THISAPP)
41CFLAGS =
42CXXFLAGS =
43
44# Normal build or /tools build.
45#
46ifeq "$(ROOT)" ""
47 TARGET = $(DIR_INFO)/$(THISAPP)
48 EXTRA_CONFIG = --prefix=/usr \
49 --disable-profile --enable-add-ons=linuxthreads \
50 --libexecdir=/usr/lib --with-headers=/usr/include \
51 --without-cvs --disable-nls
52 EXTRA_MAKE =
53 EXTRA_INSTALL =
54else
55 TARGET = $(DIR_INFO)/$(THISAPP)-tools
56 EXTRA_CONFIG = --prefix=/tools \
57 --disable-profile --enable-add-ons=linuxthreads \
58 --with-headers=/tools/include \
59 --with-binutils=/tools/bin --without-gd \
60 --without-cvs --disable-nls
61 EXTRA_MAKE =
62 EXTRA_INSTALL =
63endif
64
65###############################################################################
66# Top-level Rules
67###############################################################################
68
69objects = $(DL_FILE)
70
71$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
72
73$(DL_FILE)_MD5 = cd11fabdf5162ad68329e7b28b308278
74
75install : $(TARGET)
76
77check : $(patsubst %,$(DIR_CHK)/%,$(objects))
78
79download :$(patsubst %,$(DIR_DL)/%,$(objects))
80
81md5 : $(subst %,%_MD5,$(objects))
82
83###############################################################################
84# Downloading, checking, md5sum
85###############################################################################
86
87$(patsubst %,$(DIR_CHK)/%,$(objects)) :
88 @$(CHECK)
89
90$(patsubst %,$(DIR_DL)/%,$(objects)) :
91 @$(LOAD)
92
93$(subst %,%_MD5,$(objects)) :
94 @$(MD5)
95
96###############################################################################
97# Installation Details
98###############################################################################
99
100$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
101 @$(PREBUILD)
102 @rm -rf $(DIR_APP) $(DIR_SRC)/glibc-build && cd $(DIR_SRC) && tar jxf $(DIR_DL)/$(DL_FILE)
103 cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/glibc-2.3.3-ssp_frandom-2.patch
104 @mkdir $(DIR_SRC)/glibc-build
105 cd $(DIR_SRC)/glibc-build && $(DIR_APP)/configure $(EXTRA_CONFIG)
106ifeq "$(ROOT)" ""
107 touch /etc/ld.so.conf
108 cd $(DIR_SRC)/glibc-build && make $(EXTRA_MAKE)
109 cd $(DIR_SRC)/glibc-build && make $(EXTRA_INSTALL) install
110else
111 -mkdir /tools/etc
112 touch /tools/etc/ld.so.conf
113 cd $(DIR_SRC)/glibc-build && make $(EXTRA_MAKE) AUTOCONF=no
114 cd $(DIR_SRC)/glibc-build && make $(EXTRA_INSTALL) AUTOCONF=no install
115endif
116
117 # Locking in the toolchain
118ifeq "$(ROOT)" ""
119 SPECFILE=/tools/lib/gcc-lib/*/*/specs && \
120 sed -e 's@/tools/lib/ld-linux.so.2@/lib/ld-linux.so.2@g' \
121 $$SPECFILE > newspecfile && mv -f newspecfile $$SPECFILE
122else
123 SPECFILE=/tools/lib/gcc-lib/*/*/specs && \
124 sed -e 's@/lib/ld-linux.so.2@/tools/lib/ld-linux.so.2@g' \
125 $$SPECFILE > tempspecfile && mv -f tempspecfile $$SPECFILE
126 rm -f /tools/lib/gcc-lib/*/*/include/{pthread.h,bits/sigthread.h}
127endif
128
129 # Creating the locales
130ifeq "$(ROOT)" ""
131 mkdir -p /usr/lib/locale
132else
133 mkdir -p /tools/lib/locale
134endif
135 cd $(DIR_SRC)/glibc-build && localedef -i en_US -f ISO-8859-1 en_US
136 cd $(DIR_SRC)/glibc-build && localedef -i en_US -f UTF-8 en_US.utf8
137
138 # Configuring Glibc
139ifeq "$(ROOT)" ""
140 cp -f /usr/share/zoneinfo/GMT /etc/localtime
141endif
142 # Cleanup
143 @rm -rf $(DIR_APP) $(DIR_SRC)/glibc-build
144 @$(POSTBUILD)