]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blame - lfs/uClibc
ipsecctrl: increase delay after ipsec reload.
[people/pmueller/ipfire-2.x.git] / lfs / uClibc
CommitLineData
cd1a2927 1###############################################################################
cd1a2927 2# #
70df8302
MT
3# IPFire.org - A linux based firewall #
4# Copyright (C) 2007 Michael Tremer & Christian Schmidt #
5# #
6# This program is free software: you can redistribute it and/or modify #
cd1a2927 7# it under the terms of the GNU General Public License as published by #
70df8302 8# the Free Software Foundation, either version 3 of the License, or #
cd1a2927
MT
9# (at your option) any later version. #
10# #
70df8302 11# This program is distributed in the hope that it will be useful, #
cd1a2927
MT
12# but WITHOUT ANY WARRANTY; without even the implied warranty of #
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
14# GNU General Public License for more details. #
15# #
16# You should have received a copy of the GNU General Public License #
70df8302 17# along with this program. If not, see <http://www.gnu.org/licenses/>. #
cd1a2927 18# #
cd1a2927
MT
19###############################################################################
20
21###############################################################################
22# Definitions
23###############################################################################
24
25include Config
26
1d4ec104 27VER = 0.9.28
cd1a2927
MT
28
29THISAPP = uClibc-$(VER)
1d4ec104 30DL_FILE = $(THISAPP).tar.bz2
45405baa 31DL_FROM = $(URL_IPFIRE)
cd1a2927 32DIR_APP = $(DIR_SRC)/$(THISAPP)
bc9f0c12
MT
33ifeq "$(PASS)" "1"
34 TARGET = $(DIR_INFO)/$(THISAPP)-pass1
35else
36ifeq "$(PASS)" "2"
37 TARGET = $(DIR_INFO)/$(THISAPP)-pass2
38else
39 TARGET = $(DIR_INFO)/$(THISAPP)-pass3
40endif
41endif
42
43STAGING_DIR=/opt/$(MACHINE)-uClibc
cd1a2927
MT
44
45###############################################################################
46# Top-level Rules
47###############################################################################
48
b2c64f8c 49objects = $(DL_FILE) uClibc-locale-030818.tgz
cd1a2927 50
a50d04ab 51$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
a50d04ab 52uClibc-locale-030818.tgz = $(DL_FROM)/uClibc-locale-030818.tgz
cd1a2927 53
a50d04ab 54$(DL_FILE)_MD5 = 1ada58d919a82561061e4741fb6abd29
a50d04ab 55uClibc-locale-030818.tgz_MD5 = d75b2239b4e27c3c9cbed1c8f6eabba6
cd1a2927
MT
56
57install : $(TARGET)
58
59check : $(patsubst %,$(DIR_CHK)/%,$(objects))
60
61download :$(patsubst %,$(DIR_DL)/%,$(objects))
62
63md5 : $(subst %,%_MD5,$(objects))
64
65###############################################################################
66# Downloading, checking, md5sum
67###############################################################################
68
69$(patsubst %,$(DIR_CHK)/%,$(objects)) :
70 @$(CHECK)
71
72$(patsubst %,$(DIR_DL)/%,$(objects)) :
73 @$(LOAD)
74
75$(subst %,%_MD5,$(objects)) :
76 @$(MD5)
77
78###############################################################################
79# Installation Details
80###############################################################################
81
82$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
83 @$(PREBUILD)
bc9f0c12
MT
84ifeq "$(PASS)" "1"
85 @rm -rf $(DIR_APP)
a50d04ab 86 @mkdir -p /opt/$(MACHINE)-uClibc $(DIR_SRC)/uClibc_dev/usr/include $(DIR_SRC)/uClibc_dev/{,usr}/lib
bc9f0c12
MT
87 @cd $(DIR_SRC) && tar xfj $(DIR_DL)/$(DL_FILE)
88 cp -f $(DIR_DL)/uClibc-locale-030818.tgz $(DIR_APP)/extra/locale/
89 cp -f $(DIR_SRC)/config/uClibc/{locales,codesets}.txt $(DIR_APP)/extra/locale
90 cd $(DIR_APP)/extra/locale && patch -Np3 < $(DIR_SRC)/src/patches/uClibc-gcc4-genwctype.patch
91 cp -f $(DIR_SRC)/config/uClibc/uClibc.config-$(MACHINE) $(DIR_APP)/.config
a50d04ab
MT
92 cd $(DIR_APP) && make oldconfig
93 cd $(DIR_APP)/extra/locale && make
94 cd $(DIR_APP) && make PREFIX=$(DIR_SRC)/uClibc_dev \
95 DEVEL_PREFIX=/usr/ \
96 RUNTIME_PREFIX=$(DIR_SRC)/uClibc_dev/ \
97 pregen install_dev
bc9f0c12
MT
98else
99ifeq "$(PASS)" "2"
a50d04ab
MT
100 cd $(DIR_APP) && make PREFIX= \
101 DEVEL_PREFIX=/ \
102 RUNTIME_PREFIX=/ \
103 all
104 cd $(DIR_APP) && make PREFIX= \
105 DEVEL_PREFIX=/opt/$(MACHINE)-uClibc/ \
106 RUNTIME_PREFIX=/opt/$(MACHINE)-uClibc/ \
107 install_runtime install_dev
108
109 ## This is to fix a small bug
110 if [ ! -h /opt/$(MACHINE)-uClibc/$(MACHINE)-linux-uclibc/lib ]; then \
111 mv -vf /opt/$(MACHINE)-uClibc/$(MACHINE)-linux-uclibc/lib/* /opt/$(MACHINE)-uClibc/lib/; \
112 rm -rf /opt/$(MACHINE)-uClibc/$(MACHINE)-linux-uclibc/lib; \
113 ln -sfv ../lib /opt/$(MACHINE)-uClibc/$(MACHINE)-linux-uclibc/lib; \
114 fi
115
116 cd $(DIR_APP) && make -C utils/ PREFIX=/opt/$(MACHINE)-uClibc \
117 hostutils
118 cd $(DIR_APP) && make PREFIX=/install/initrd \
119 DEVEL_PREFIX=/usr/ \
120 RUNTIME_PREFIX=/ \
121 install_runtime
1d4ec104
MT
122 cp -f /opt/$(MACHINE)-uClibc/lib/ld-uClibc-$(VER).so /lib
123 cp -f /opt/$(MACHINE)-uClibc/lib/libuClibc-$(VER).so /lib
1d4ec104
MT
124 cd /lib && ln -sf ld-uClibc-$(VER).so ld-uClibc.so.0
125 cd /lib && ln -sf libuClibc-$(VER).so libc.so.0
126 cd /lib && ln -sf libc.so.0 libc.so
bc9f0c12
MT
127 ln -sf /opt/$(MACHINE)-uClibc/lib/libm-$(VER).so /lib/libm.so.0
128else
a50d04ab 129 cd $(DIR_APP) && make PREFIX=/install/initrd utils install_utils
bc9f0c12
MT
130 chmod 755 /install/initrd/lib/libuClibc-$(VER).so
131 rm -f /install/initrd/lib/{libm*,libcrypt*,libutil*,librt*}
132 @rm -rf $(DIR_APP)
133endif
134endif
cd1a2927 135 @$(POSTBUILD)