source: floppyfw/Makefile @ 8

Revision 8, 8.4 KB checked in by root, 9 years ago (diff)

Ouch, typo.

Line 
1#
2# Makefile for floppyfw.
3# As you can see, this is based on the buildroot/busybox/uClibc Make system.
4#
5# Changes are Copyright (C) 2003-2004 Thomas Lundquist <thomasez@zelow.no>
6#
7
8# Makefile for a simple busybox/uClibc root filesystem
9#
10# Copyright (C) 2001-2003 Erik Andersen <andersen@codepoet.org>
11# Copyright (C) 2002 by Tim Riker <Tim@Rikers.org>
12#
13# This program is free software; you can redistribute it and/or modify
14# it under the terms of the GNU Library General Public License as
15# published by the Free Software Foundation; either version 2 of the
16# License, or (at your option) any later version.
17#
18# This program is distributed in the hope that it will be useful, but
19# WITHOUT ANY WARRANTY; without even the implied warranty of
20# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21# Library General Public License for more details.
22#
23# You should have received a copy of the GNU Library General Public
24# License along with this program; if not, write to the Free Software
25# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
26# USA
27
28# $Id: Makefile,v 1.31 2005/12/07 19:50:42 thomasez Exp $
29
30#############################################################
31#
32# EDIT this stuff to suit your system and preferences
33#
34# Use := when possible to get precomputation, thereby
35# speeding up the build process.
36#
37#############################################################
38
39# Which version of floppyfw is this?
40FLOPPYFW_VERSION=2.99.5
41
42# What sortof target system shall we compile this for?
43ARCH:=i386
44#ARCH:=arm
45#ARCH:=mips
46#ARCH:=mipsel
47#ARCH:=powerpc
48#ARCH:=sh4
49#ARCH:=cris
50#ARCH:=m68k
51#ARCH:=v850
52#ARCH:=sparc
53#ARCH:=sh64
54#ARCH:=whatever
55
56# If you want to add FPU/MATH emulation, set this to true;
57# (Not implemented yet.)
58EMULATE_FPU=false
59
60# Command used to download source code
61WGET:=wget --passive-ftp
62
63# Optimize toolchain for which type of CPU?
64# WARNING!!!  CURRENTLY BROKEN!!! LEAVE IT AS $(ARCH)!!!
65OPTIMIZE_FOR_CPU=$(ARCH)
66# WARNING!!!  CURRENTLY BROKEN!!! LEAVE IT AS $(ARCH)!!!
67#OPTIMIZE_FOR_CPU=i486
68#OPTIMIZE_FOR_CPU=strongarm
69#OPTIMIZE_FOR_CPU=whatever
70
71TARGET_OPTIMIZATION=-Os
72TARGET_DEBUGGING= #-g
73
74# Any additional gcc options you may want to include....
75EXTRA_GCC_CONFIG_OPTIONS=
76
77# For SMP machines some stuff can be run in parallel
78JLEVEL=-j2
79
80# Sourceforge-mirror:
81SF_MIRROR=http://voxel.dl.sourceforge.net
82
83
84#############################################################
85#
86# The list of stuff to build for the target filesystem
87#
88#############################################################
89
90TARGETS+=uclibc
91
92# Probably a good thing even if you choose not to patch anything.
93# This target only unpacks. The linux target does the patching.
94TARGETS+=patch-o-matic
95
96# POM-patches to add:
97# I could have used base but some of the patches has a problem.
98# It's alot here, probably not so smart, cut back later.
99POM_PATCHES=string h323-conntrack-nat quake3-conntrack-nat connlimit dstlimit mport pptp-conntrack-nat directx8-conntrack-nat time cuseeme-nat rtsp-conntrack iprange random ipp2p mms-conntrack-nat CONNMARK CLASSIFY
100
101# These are the ones from above minus those not in the newest p-o-m (plus a
102# few nwe ones):
103POM_PATCHES=h323-conntrack-nat quake3-conntrack-nat connlimit dstlimit mport pptp-conntrack-nat directx8-conntrack-nat time cuseeme-nat rtsp-conntrack iprange random ipp2p mms-conntrack-nat connrate msnp-conntrack-nat nth sip-conntrack-nat set expire psd time
104# Did not apply cleanly: dropped-table tproxy
105#
106# Did not compile cleanly:
107#   policy: (ipt_policy.c:15:22: net/xfrm.h: No such file or directory)
108#
109#   osf: (extensions/libipt_osf.c: In function `help':
110#   extensions/libipt_osf.c:46: warning: too many arguments for format
111#   extensions/libipt_osf.c: In function `parse':
112#   extensions/libipt_osf.c:107: error: `IPT_OSF_CONNECTOR' undeclared (first use in this function)
113#   extensions/libipt_osf.c:107: error: (Each undeclared identifier is reported only once
114#   )
115#
116# Missing: string
117
118TARGETS+=linux
119
120TARGETS+=busybox
121USE_BUSYBOX_SNAPSHOT=true
122
123TARGETS+=iptables
124
125TARGETS+=iproute2
126
127TARGETS+=dnsmasq
128
129TARGETS+=bridgeutils
130
131# TARGETS+=modutils
132
133TARGETS+=pppd
134
135TARGETS+=pppoe
136
137TARGETS+=pcmcia
138
139TARGETS+=wireless-tools
140
141TARGETS+=dropbear
142
143TARGETS+=ethtool
144
145TARGETS+=e3
146
147# This won't work, yet. It awaits a newer uClibc version.
148# TARGETS+=noip2
149
150TARGETS+=nanotop
151
152#TARGETS+=siproxd
153
154# The hostap target will add patches to the kernel and build a hostap.ffw
155# package with hostapd, hostap-driver and wpa_supplicant and hostap-utils
156# if you set it here.
157# TARGETS+=hostap
158# TARGETS+=hostap-utils
159
160# Not yet
161# TARGETS+=ebtables
162
163# And at last:
164TARGETS+=module-packages
165TARGETS+=floppy
166
167#############################################################
168#
169# You should probably leave this stuff alone unless you know
170# what you are doing.
171#
172#############################################################
173
174TARGET_CFLAGS=$(TARGET_OPTIMIZATION) $(TARGET_DEBUGGING) $(TARGET_SOFT_FLOAT)
175# TARGET_CC=distcc gcc
176TARGET_CC=gcc
177TARGET_CX=g++
178
179HOSTCC:=distcc gcc
180BASE_DIR:=${shell pwd}
181SOURCE_DIR:=$(BASE_DIR)/sources
182SCRIPTS_DIR:=$(BASE_DIR)/scripts
183CONFIG_DIR:=$(BASE_DIR)/configs
184LICENSES_DIR:=$(BASE_DIR)/licenses
185MODULES_BASE_DIR:=$(BASE_DIR)/modules
186MODULES_DIR:=$(MODULES_BASE_DIR)/2.4-std
187DL_DIR:=$(BASE_DIR)/downloads
188PATCH_DIR=$(BASE_DIR)/patches
189PACKAGES_DIR=$(BASE_DIR)/packages
190PACKAGES_INI_DIR=$(PACKAGES_DIR)/scripts
191PACKAGES_SKELETON_DIR=$(PACKAGES_DIR)/skeleton
192INITRD_DIR=$(BASE_DIR)/initrd
193INITRD_MASTER=$(INITRD_DIR)/master
194ADD_DIR=$(BASE_DIR)/add
195ADD_MASTER=$(ADD_DIR)/master
196
197TMP_DIR=$(BASE_DIR)/tmp
198
199# Need another name maybe?
200BUILD_DIR:=$(BASE_DIR)/build_$(ARCH)$(ARCH_FPU_SUFFIX)
201
202TARFLAGS=--format oldgnu
203# This may be a problem to use but I'll try.
204# --strip-unneeded
205STRIP=strip --strip-unneeded -g --remove-section=.comment --remove-section=.note
206SSTRIP=sstrip
207DEPMOD=(cd $(LINUX_DIR) ; /sbin/depmod -ae -F System.map -b $(MODULES_DIR) \
208                -r $(LINUX_VERSION))
209# SED=/bin/sed -i -e
210SED=/usr/bin/perl -p -i -e
211LZMAD=lzmacat
212LZMAC=lzmacomp
213MAKE=/usr/bin/make $(JLEVEL)
214HOST_ARCH:=$(shell $(HOSTCC) -dumpmachine | sed -e s'/-.*//' \
215        -e 's/sparc.*/sparc/' \
216        -e 's/arm.*/arm/g' \
217        -e 's/m68k.*/m68k/' \
218        -e 's/ppc/powerpc/g' \
219        -e 's/v850.*/v850/g' \
220        -e 's/sh[234]/sh/' \
221        -e 's/mips-.*/mips/' \
222        -e 's/mipsel-.*/mipsel/' \
223        -e 's/cris.*/cris/' \
224        -e 's/i[3-9]86/i386/' \
225        )
226
227GNU_HOST_NAME:=$(HOST_ARCH)-pc-linux-gnu
228
229all:   world
230
231TARGETS_CLEAN:=$(patsubst %,%-clean,$(TARGETS))
232TARGETS_SOURCE:=$(patsubst %,%-source,$(TARGETS))
233TARGETS_DIRCLEAN:=$(patsubst %,%-dirclean,$(TARGETS))
234
235world: $(ADD_MASTER) $(INITRD_MASTER) $(DL_DIR) $(TMP_DIR) $(BUILD_DIR) $(PACKAGES_DIR) $(TARGETS)
236
237.PHONY: all world clean dirclean distclean source $(TARGETS) \
238        $(TARGETS_CLEAN) $(TARGETS_DIRCLEAN) $(TARGETS_SOURCE)
239
240include makefiles/*.mk
241
242#############################################################
243#
244# staging and target directories do NOT list these as
245# dependancies anywhere else
246#
247#############################################################
248$(TMP_DIR):
249        mkdir -p $(TMP_DIR)
250
251$(DL_DIR):
252        mkdir -p $(DL_DIR)
253
254$(BUILD_DIR):
255        mkdir -p $(BUILD_DIR)
256
257$(PACKAGES_DIR):
258        mkdir -p $(PACKAGES_DIR)
259
260$(MODULES_BASE_DIR):
261        mkdir -p $(MODULES_BASE_DIR)
262
263$(MODULES_DIR):
264        mkdir -p $(MODULES_DIR)
265
266$(ADD_MASTER):
267        cp -a $(ADD_DIR)/skeleton $(ADD_MASTER)
268        -find $(ADD_MASTER) -type d -name CVS -exec rm -rf {} \; > /dev/null 2>&1
269        -find $(ADD_MASTER) -type d -name .svn -exec rm -rf {} \; > /dev/null 2>&1
270
271$(INITRD_MASTER):
272        cp -a $(INITRD_DIR)/skeleton $(INITRD_MASTER)
273        -find $(INITRD_MASTER) -type d -name CVS -exec rm -rf {} \; > /dev/null 2>&1
274        -find $(INITRD_MASTER) -type d -name .svn -exec rm -rf {} \; > /dev/null 2>&1
275
276source: $(TARGETS_SOURCE)
277
278#############################################################
279#
280# Cleanup and misc junk
281#
282# Fix later.. (yeah!)
283#
284#############################################################
285clean: $(TARGETS_CLEAN)
286        rm -rf $(INITRD_MASTER) $(ADD_MASTER) 
287
288dirclean: $(TARGETS_DIRCLEAN)
289        rm -rf $(INITRD_MASTER) $(ADD_MASTER) 
290
291distclean:
292        rm -rf $(DL_DIR) $(BUILD_DIR)
293
294sourceball:
295        rm -rf $(BUILD_DIR)
296        set -e; \
297        cd ..; \
298        rm -f buildroot.tar.bz2; \
299        tar -cvf buildroot.tar buildroot; \
300        bzip2 -9 buildroot.tar; \
301
302list-targets:
303        @echo "TARGETS:"
304        @(for t in $(TARGETS); do \
305                echo -e "\t$$t"; \
306          done \
307        )
308        @echo "TARGETS_CLEAN:"
309        @(for t in $(TARGETS_CLEAN); do \
310                echo -e "\t$$t"; \
311          done \
312        )
313        @echo "TARGETS_DIRCLEAN:"
314        @(for t in $(TARGETS_DIRCLEAN); do \
315                echo -e "\t$$t"; \
316          done \
317        )
318        @echo "TARGETS_SOURCE:"
319        @(for t in $(TARGETS_SOURCE); do \
320                echo -e "\t$$t"; \
321          done \
322        )
Note: See TracBrowser for help on using the repository browser.