source: floppyfw/Makefile @ 1

Revision 1, 7.3 KB checked in by root, 8 years ago (diff)

First post

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#############################################################
81#
82# The list of stuff to build for the target filesystem
83#
84#############################################################
85
86TARGETS+=uclibc
87
88# Probably a good thing even if you choose not to patch anything.
89# This target only unpacks. The linux target does the patching.
90TARGETS+=patch-o-matic
91
92# POM-patches to add:
93# I could have used base but some of the patches has a problem.
94# It's alot here, probably not so smart, cut back later.
95POM_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
96
97TARGETS+=linux
98
99TARGETS+=busybox
100USE_BUSYBOX_SNAPSHOT=true
101
102TARGETS+=iptables
103
104TARGETS+=iproute2
105
106TARGETS+=dnsmasq
107
108TARGETS+=bridgeutils
109
110# TARGETS+=modutils
111
112TARGETS+=pppd
113
114TARGETS+=pppoe
115
116TARGETS+=pcmcia
117
118TARGETS+=wireless-tools
119
120TARGETS+=dropbear
121
122TARGETS+=ethtool
123
124TARGETS+=e3
125
126# This won't work, yet. It awaits a newer uClibc version.
127# TARGETS+=noip2
128
129TARGETS+=nanotop
130
131#TARGETS+=siproxd
132
133# The hostap target will add patches to the kernel and build a hostap.ffw
134# package with hostapd, hostap-driver and wpa_supplicant and hostap-utils
135# if you set it here.
136# TARGETS+=hostap
137# TARGETS+=hostap-utils
138
139# Not yet
140# TARGETS+=ebtables
141
142# And at last:
143TARGETS+=module-packages
144TARGETS+=floppy
145
146#############################################################
147#
148# You should probably leave this stuff alone unless you know
149# what you are doing.
150#
151#############################################################
152
153TARGET_CFLAGS=$(TARGET_OPTIMIZATION) $(TARGET_DEBUGGING) $(TARGET_SOFT_FLOAT)
154# TARGET_CC=distcc gcc
155TARGET_CC=gcc
156TARGET_CX=g++
157
158HOSTCC:=distcc gcc
159BASE_DIR:=${shell pwd}
160SOURCE_DIR:=$(BASE_DIR)/sources
161SCRIPTS_DIR:=$(BASE_DIR)/scripts
162CONFIG_DIR:=$(BASE_DIR)/configs
163LICENSES_DIR:=$(BASE_DIR)/licenses
164MODULES_BASE_DIR:=$(BASE_DIR)/modules
165MODULES_DIR:=$(MODULES_BASE_DIR)/2.4-std
166DL_DIR:=$(BASE_DIR)/downloads
167PATCH_DIR=$(BASE_DIR)/patches
168PACKAGES_DIR=$(BASE_DIR)/packages
169PACKAGES_INI_DIR=$(PACKAGES_DIR)/scripts
170PACKAGES_SKELETON_DIR=$(PACKAGES_DIR)/skeleton
171INITRD_DIR=$(BASE_DIR)/initrd
172INITRD_MASTER=$(INITRD_DIR)/master
173ADD_DIR=$(BASE_DIR)/add
174ADD_MASTER=$(ADD_DIR)/master
175
176TMP_DIR=$(BASE_DIR)/tmp
177
178# Need another name maybe?
179BUILD_DIR:=$(BASE_DIR)/build_$(ARCH)$(ARCH_FPU_SUFFIX)
180
181TARFLAGS=--format oldgnu
182# This may be a problem to use but I'll try.
183# --strip-unneeded
184STRIP=strip -g --remove-section=.comment --remove-section=.note
185SSTRIP=sstrip
186DEPMOD=(cd $(LINUX_DIR) ; /sbin/depmod -ae -F System.map -b $(MODULES_DIR) \
187                -r $(LINUX_VERSION))
188# SED=/bin/sed -i -e
189SED=/usr/bin/perl -p -i -e
190LZMAD=lzmacat
191LZMAC=lzmacomp
192MAKE=/usr/bin/make $(JLEVEL)
193HOST_ARCH:=$(shell $(HOSTCC) -dumpmachine | sed -e s'/-.*//' \
194        -e 's/sparc.*/sparc/' \
195        -e 's/arm.*/arm/g' \
196        -e 's/m68k.*/m68k/' \
197        -e 's/ppc/powerpc/g' \
198        -e 's/v850.*/v850/g' \
199        -e 's/sh[234]/sh/' \
200        -e 's/mips-.*/mips/' \
201        -e 's/mipsel-.*/mipsel/' \
202        -e 's/cris.*/cris/' \
203        -e 's/i[3-9]86/i386/' \
204        )
205
206GNU_HOST_NAME:=$(HOST_ARCH)-pc-linux-gnu
207
208all:   world
209
210TARGETS_CLEAN:=$(patsubst %,%-clean,$(TARGETS))
211TARGETS_SOURCE:=$(patsubst %,%-source,$(TARGETS))
212TARGETS_DIRCLEAN:=$(patsubst %,%-dirclean,$(TARGETS))
213
214world: $(ADD_MASTER) $(INITRD_MASTER) $(DL_DIR) $(TMP_DIR) $(BUILD_DIR) $(PACKAGES_DIR) $(TARGETS)
215
216.PHONY: all world clean dirclean distclean source $(TARGETS) \
217        $(TARGETS_CLEAN) $(TARGETS_DIRCLEAN) $(TARGETS_SOURCE)
218
219include makefiles/*.mk
220
221#############################################################
222#
223# staging and target directories do NOT list these as
224# dependancies anywhere else
225#
226#############################################################
227$(TMP_DIR):
228        mkdir -p $(TMP_DIR)
229
230$(DL_DIR):
231        mkdir -p $(DL_DIR)
232
233$(BUILD_DIR):
234        mkdir -p $(BUILD_DIR)
235
236$(PACKAGES_DIR):
237        mkdir -p $(PACKAGES_DIR)
238
239$(MODULES_BASE_DIR):
240        mkdir -p $(MODULES_BASE_DIR)
241
242$(MODULES_DIR):
243        mkdir -p $(MODULES_DIR)
244
245$(ADD_MASTER):
246        cp -a $(ADD_DIR)/skeleton $(ADD_MASTER)
247        -find $(ADD_MASTER) -type d -name CVS -exec rm -rf {} \; > /dev/null 2>&1
248
249$(INITRD_MASTER):
250        cp -a $(INITRD_DIR)/skeleton $(INITRD_MASTER)
251        -find $(INITRD_MASTER) -type d -name CVS -exec rm -rf {} \; > /dev/null 2>&1
252
253source: $(TARGETS_SOURCE)
254
255#############################################################
256#
257# Cleanup and misc junk
258#
259# Fix later.. (yeah!)
260#
261#############################################################
262clean: $(TARGETS_CLEAN)
263        rm -rf $(INITRD_MASTER) $(ADD_MASTER) 
264
265dirclean: $(TARGETS_DIRCLEAN)
266        rm -rf $(INITRD_MASTER) $(ADD_MASTER) 
267
268distclean:
269        rm -rf $(DL_DIR) $(BUILD_DIR)
270
271sourceball:
272        rm -rf $(BUILD_DIR)
273        set -e; \
274        cd ..; \
275        rm -f buildroot.tar.bz2; \
276        tar -cvf buildroot.tar buildroot; \
277        bzip2 -9 buildroot.tar; \
278
279list-targets:
280        @echo "TARGETS:"
281        @(for t in $(TARGETS); do \
282                echo -e "\t$$t"; \
283          done \
284        )
285        @echo "TARGETS_CLEAN:"
286        @(for t in $(TARGETS_CLEAN); do \
287                echo -e "\t$$t"; \
288          done \
289        )
290        @echo "TARGETS_DIRCLEAN:"
291        @(for t in $(TARGETS_DIRCLEAN); do \
292                echo -e "\t$$t"; \
293          done \
294        )
295        @echo "TARGETS_SOURCE:"
296        @(for t in $(TARGETS_SOURCE); do \
297                echo -e "\t$$t"; \
298          done \
299        )
Note: See TracBrowser for help on using the repository browser.