1 ###############################################################################
2 # This file is part of the IPCop Firewall. #
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. #
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. #
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 #
18 # Makefiles are based on LFSMake, which is #
19 # Copyright (C) 2002 Rod Roard <rod@sunsetsystems.com> #
21 ###############################################################################
23 ###############################################################################
25 ###############################################################################
31 THISAPP = glibc-$(VER)-lfs-5.1
32 DL_FILE = $(THISAPP).tar.bz2
33 DL_FROM = $(URL_IPFIRE)
34 DIR_APP = $(DIR_SRC)/$(THISAPP)
38 # Normal build or /tools build.
41 TARGET = $(DIR_INFO)/$(THISAPP)
42 EXTRA_CONFIG = --prefix=/usr \
43 --disable-profile --enable-add-ons=linuxthreads \
44 --libexecdir=/usr/lib --with-headers=/usr/include \
45 --without-cvs --disable-nls
49 TARGET = $(DIR_INFO)/$(THISAPP)-tools
50 EXTRA_CONFIG = --prefix=/tools \
51 --disable-profile --enable-add-ons=linuxthreads \
52 --with-headers=/tools/include \
53 --with-binutils=/tools/bin --without-gd \
54 --without-cvs --disable-nls
59 ###############################################################################
61 ###############################################################################
65 $(DL_FILE) = $(DL_FROM)/$(DL_FILE)
67 $(DL_FILE)_MD5 = cd11fabdf5162ad68329e7b28b308278
71 check : $(patsubst %,$(DIR_CHK)/%,$(objects))
73 download :$(patsubst %,$(DIR_DL)/%,$(objects))
75 md5 : $(subst %,%_MD5,$(objects))
77 ###############################################################################
78 # Downloading, checking, md5sum
79 ###############################################################################
81 $(patsubst %,$(DIR_CHK)/%,$(objects)) :
84 $(patsubst %,$(DIR_DL)/%,$(objects)) :
87 $(subst %,%_MD5,$(objects)) :
90 ###############################################################################
91 # Installation Details
92 ###############################################################################
94 $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
96 @rm -rf $(DIR_APP) $(DIR_SRC)/glibc-build && cd $(DIR_SRC) && tar jxf $(DIR_DL)/$(DL_FILE)
97 cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/glibc-2.3.3-ssp_frandom-2.patch
98 @mkdir $(DIR_SRC)/glibc-build
99 cd $(DIR_SRC)/glibc-build && $(DIR_APP)/configure $(EXTRA_CONFIG)
101 touch /etc/ld.so.conf
102 cd $(DIR_SRC)/glibc-build && make $(EXTRA_MAKE)
103 cd $(DIR_SRC)/glibc-build && make $(EXTRA_INSTALL) install
106 touch /tools/etc/ld.so.conf
107 cd $(DIR_SRC)/glibc-build && make $(EXTRA_MAKE) AUTOCONF=no
108 cd $(DIR_SRC)/glibc-build && make $(EXTRA_INSTALL) AUTOCONF=no install
111 # Locking in the toolchain
113 SPECFILE=/tools/lib/gcc-lib/*/*/specs && \
114 sed -e 's@/tools/lib/ld-linux.so.2@/lib/ld-linux.so.2@g' \
115 $$SPECFILE > newspecfile && mv -f newspecfile $$SPECFILE
117 SPECFILE=/tools/lib/gcc-lib/*/*/specs && \
118 sed -e 's@/lib/ld-linux.so.2@/tools/lib/ld-linux.so.2@g' \
119 $$SPECFILE > tempspecfile && mv -f tempspecfile $$SPECFILE
120 rm -f /tools/lib/gcc-lib/*/*/include/{pthread.h,bits/sigthread.h}
123 # Creating the locales
125 mkdir -p /usr/lib/locale
127 mkdir -p /tools/lib/locale
129 cd $(DIR_SRC)/glibc-build && localedef -i en_US -f ISO-8859-1 en_US
130 cd $(DIR_SRC)/glibc-build && localedef -i en_US -f UTF-8 en_US.utf8
134 cp -f /usr/share/zoneinfo/GMT /etc/localtime
137 @rm -rf $(DIR_APP) $(DIR_SRC)/glibc-build