[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[openap-cvs] : wl11000 Makefile,1.9,1.10
From: |
David Kimdon <address@hidden> |
Subject: |
[openap-cvs] : wl11000 Makefile,1.9,1.10 |
Date: |
Wed, 17 Jul 2002 16:35:37 -0400 |
Update of /cvsroot/openap/wl11000
In directory subversions:/tmp/cvs-serv15091
Modified Files:
Makefile
Log Message:
rearrange many things so we can more easily target different boards
fixup to mklibs to old python.
Index: Makefile
===================================================================
RCS file: /cvsroot/openap/wl11000/Makefile,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- Makefile 17 Jul 2002 01:50:29 -0000 1.9
+++ Makefile 17 Jul 2002 20:35:33 -0000 1.10
@@ -2,41 +2,17 @@
#
# Copyright (C) 2001-2002 Instant802 Networks Inc.
#
-# Quickstart to build a new flash image:
-#
-# $ make tools
-# $ su
-# Password:
-# # make install
-# # exit
-# $ make bootstrap
-#
-# After a while you should have 2 files flash and flash.md5.
-#
-# This distribution includes tools used to build the target filesystem as well
-# as sources for the target filesystem itself. The tools need only be built
-# once (unless you change them, but you probably won't need to) and from that
-# point on you can leave them alone. The target (Access Point) is has an i386
-# processor and we don't include a cross-compiler. If your host (machine you
-# develop on) doesn't have an i386 processor you need to first build a
-# cross-compiler and edit the uclibc and kernel configuration appropriately.
-#
-# The first step to getting Linux running on your AP is to boot off an SRAM
-# card, details in the html documentation. The sram target creates this image.
-#
# targets -
# tools : build uclibc and assorted tools
# install : install uclibc toolchain (must be root)
# bootstrap : configure and build kernel, then flash
# sram : make sram image
+# Set this to an initial configuration file for your board
+TARGET_CONFIG=config/wl11000.in
-# Notes for developers:
-# I'm gradually making this distribution configurable, you can help. If you
-# want to add something that will take up either flash or RAM at runtime please
-# consider for a moment whether or not _everyone_ will want it. If not
everyone
-# will want it, please make it configurable.
-#
+# No need to change anything below this line unless you are
+# hacking on the build system.
all: do-it-all
@@ -51,44 +27,71 @@
else if [ -x /bin/bash ]; then echo /bin/bash; \
else echo sh; fi ; fi)
-OPENAP_VERSION = 0.1.2-pre
+OPENAP_VERSION = 0.1.3
TOPDIR := $(shell pwd)
KERNEL_DIR := $(TOPDIR)/linux
IMAGE_DIR := $(TOPDIR)/Image_final
-TOOL_PREFIX=$(shell echo $(CONFIG_PREFIX))
-CROSS_COMPILE=$(TOOL_PREFIX)/bin/
-CC=$(CROSS_COMPILE)gcc
-AR=$(CROSS_COMPILE)ar
-LD=$(CROSS_COMPILE)ld
-STRIP=$(CROSS_COMPILE)strip
+# The echo's are just to remove leading and trailing quotes.
+CONFIG_PREFIX:=$(shell echo $(CONFIG_PREFIX))
+CONFIG_TARGET:=$(shell echo $(CONFIG_TARGET))
+CONFIG_SITE:=$(TOPDIR)/$(shell echo $(CONFIG_SITE))
+ARCH:=$(shell echo $(CONFIG_TARGET) | sed -e 's/-.*//')
+
+CC=$(CONFIG_TARGET)-gcc
+LD=$(CONFIG_TARGET)-ld
+AR=$(CONFIG_TARGET)-ar
+STRIP=$(CONFIG_TARGET)-strip
MKNOD=/bin/mknod
INSTALL=/usr/bin/install
STRIPFLAGS="--remove-section=.comment --remove-section=.note"
CFLAGS =-Wall -Wstrict-prototypes
-HOSTCC = gcc
+# FIXME: actually set host CC?
+HOSTCC = /usr/bin/gcc -B/usr/bin/
-export HOSTCC OPENAP_VERSION TOPDIR
+PATH:=$(CONFIG_PREFIX)/$(CONFIG_TARGET)/$(ARCH)-linux/bin:$(CONFIG_PREFIX)/$(CONFIG_TARGET)/bin:$(PATH)
+export HOSTCC OPENAP_VERSION TOPDIR CONFIG_SITE PATH TOOL_PREFIX
+
+
+# Convienience target, create a cross-compiling shell. The logic above sets
+# some environmental variables that tell make, configure etc. to do the right
+# thing for the target we are working with. This will give you a shell with
+# those variables set and you will end up with a system working as you expect
+# it to (building for your target)
+
+xshell:
+ env
+ $(CONFIG_SHELL)
+
+LIBS=libpcap libnet
+
+libs:
+ for dir in $(LIBS) ; do \
+ if ! ( cd $$dir && $(MAKE) -f ./i802/rules install) ; then \
+ exit 1 ; \
+ fi \
+ done
#
-# When creating an sram image you must specify the size of the card (in
megabytes).
+# When creating an sram image you must specify the size of the card (in
+# megabytes).
#
SRAM_SIZE=2
-uclibc:
- mkdir -p /opt/openap-$(OPENAP_VERSION)/ || \
- (echo "failed to create /opt/openap-$(OPENAP_VERSION)"; exit 1)
- mkdir build/
+tools:
+ mkdir -p $(CONFIG_PREFIX) || \
+ (echo "failed to create $(CONFIG_PREFIX)"; exit 1)
+ mkdir -p build/
+ -cd build/gcc-2.95 && $(MAKE) clean
cd build && tar -xzf ../misc/gcc-2.95-uclibc-20020711.src.tar.gz
patch -p0 < misc/uclibc-build.diff
- cd build/gcc-2.95 && make TARGET_PATH=/opt/openap-$(OPENAP_VERSION)/
-
-tools: check config_kernel cramfs
- $(MAKE) -C uclibc KERNEL_SOURCE=$(KERNEL_DIR)
+ cd build/gcc-2.95 && make \
+ TARGET_PATH=$(CONFIG_PREFIX)/$(CONFIG_TARGET) \
+ ARCH=$(ARCH)
cramfs:
$(MAKE) CC=gcc -C $(KERNEL_DIR)/scripts/cramfs/
@@ -155,7 +158,7 @@
kernel:
$(MAKE) -C linux oldconfig
$(MAKE) -C linux dep
- $(MAKE) -C linux bzImage ROOT_DEV="31 0"
+ $(MAKE) -C linux bzImage ROOT_DEV=$(CONFIG_ROOT_DEV)
clean_image:
@@ -251,17 +254,18 @@
reduce:
$(INSTALL) -d $(IMAGE_DIR)/lib
scripts/mklibs -v \
- -L $(TOOL_PREFIX)/lib \
- --target=$(CROSS_COMPILE) \
+ --no-default-lib \
+ -L $(CONFIG_PREFIX)/$(CONFIG_TARGET)/lib \
+ --target=$(CONFIG_TARGET) \
-d $(IMAGE_DIR)/lib \
--ldlib=ld-uClibc.so.0 \
`find $(IMAGE_DIR) -type f -perm +0111`
#####################################################################
-foo menuconfig:
+menuconfig:
$(MAKE) -C scripts/lxdialog all
- $(CONFIG_SHELL) scripts/Menuconfig config.in
+ $(CONFIG_SHELL) scripts/Menuconfig $(TARGET_CONFIG)
subdir-y :=
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [openap-cvs] : wl11000 Makefile,1.9,1.10,
David Kimdon <address@hidden> <=
- Prev by Date:
[openap-cvs] : wl11000/Documentation - New directory
- Next by Date:
[openap-cvs] : wl11000/config config.in,NONE,1.1 cross-config.i386,NONE,1.1 wl11000.in,NONE,1.1
- Previous by thread:
[openap-cvs] : wl11000/Documentation - New directory
- Next by thread:
[openap-cvs] : wl11000/config config.in,NONE,1.1 cross-config.i386,NONE,1.1 wl11000.in,NONE,1.1
- Index(es):