openap-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[openap-cvs] : openap-main Makefile,1.1.1.1,1.2


From: David Kimdon <address@hidden>
Subject: [openap-cvs] : openap-main Makefile,1.1.1.1,1.2
Date: Thu, 18 Jul 2002 20:39:04 -0400

Update of /cvsroot/openap/openap-main
In directory subversions:/tmp/cvs-serv24710

Modified Files:
        Makefile 
Log Message:
many changes, supporting new build setup.


Index: Makefile
===================================================================
RCS file: /cvsroot/openap/openap-main/Makefile,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- Makefile    18 Jul 2002 19:56:59 -0000      1.1.1.1
+++ Makefile    19 Jul 2002 00:39:02 -0000      1.2
@@ -3,13 +3,15 @@
 # Copyright (C) 2001-2002 Instant802 Networks Inc.
 #
 # 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
+#   bootstrap : build assorted tools
+#
+
+# Set this to your target board.
+TARGET=wl11000
 
-# Set this to an initial configuration file for your board
-TARGET_CONFIG=config/wl11000.in
+# Set this to your taret flavor, if any.  Leave it as 'def' if you
+# want the default.
+FLAVOR=def
 
 # No need to change anything below this line unless you are
 # hacking on the build system.
@@ -27,38 +29,52 @@
          else if [ -x /bin/bash ]; then echo /bin/bash; \
          else echo sh; fi ; fi)
 
-OPENAP_VERSION = 0.1.3
-
-TOPDIR      := $(shell pwd)
-KERNEL_DIR      := $(TOPDIR)/linux
-
-IMAGE_DIR    := $(TOPDIR)/Image_final
+OPENAP_VERSION         =  0.1.3
+TOPDIR         := $(shell pwd)
+STAMPDIR       =  $(TOPDIR)
+KERNEL_DIR      =  $(TOPDIR)/linux
+IMAGE_DIR      =  $(TOPDIR)/Image_final
+TARGET_CONFIG  =  $(TOPDIR)/config/$(TARGET)/config.in
 
 # 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/-.*//')
-TARGET_PATH:=$(CONFIG_PREFIX)/$(CONFIG_TARGET)
-
-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
+CONFIG_PREFIX  := $(shell echo $(CONFIG_PREFIX))
+CONFIG_TARGET  := $(shell echo $(CONFIG_TARGET))
+TARGET_PATH    =  $(CONFIG_PREFIX)/$(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         ="/usr/bin/gcc -B/usr/bin/"
 
-# FIXME: actually set host CC?
-HOSTCC = /usr/bin/gcc -B/usr/bin/
+include make/rules.mk
+sinclude config/$(TARGET)/config.mk
 
-# if we are building the toolchain we don't need or want to change the path
+# If we are building the toolchain we don't need or want to change the path.
 ifneq ($(MAKECMDGOALS),tools)
+ifneq ($(MAKECMDGOALS),bootstrap)
+ifneq ($(MAKECMDGOALS),foo)
 
PATH:=$(CONFIG_PREFIX)/$(CONFIG_TARGET)/$(ARCH)-linux/bin:$(CONFIG_PREFIX)/$(CONFIG_TARGET)/bin:$(PATH)
 endif
+endif
+endif
 
-export HOSTCC OPENAP_VERSION TOPDIR CONFIG_SITE PATH TOOL_PREFIX TARGET_PATH 
ARCH
+export HOSTCC OPENAP_VERSION TOPDIR CONFIG_SITE PATH TOOL_PREFIX TARGET_PATH 
ARCH \
+  TARGET
+
+bootstrap: tools configure kernel flash
+
+configure: config_pcmcia $(STAMPDIR)/.configure
+$(STAMPDIR)/.configure: $(KERNEL_DIR)/.config $(TOPDIR)/.config
+       $(MAKE) -C $(KERNEL_DIR) oldconfig
+       $(MAKE) -C $(KERNEL_DIR) dep HOSTCC=$(HOSTCC)
+       $(MAKE) oldconfig
+       touch $(STAMPDIR)/.configure
 
 # Convienience target, create a cross-compiling shell.  The logic above sets
 # some environmental variables that tell make, configure etc. to do the right
@@ -70,68 +86,6 @@
        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).
-#
-
-SRAM_SIZE=2
-
-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=$(TARGET_PATH) \
-               ARCH=$(ARCH) | \
-               tee build.log
-
-cramfs:
-       $(MAKE) CC=gcc -C $(KERNEL_DIR)/scripts/cramfs/
-
-bootstrap: config kernel flash
-
-config: config_kernel config_pcmcia
-
-config_kernel:
-
-ifeq ($(CONFIG_AP_BRIDGE),y)
-       cp misc/kernel_config $(KERNEL_DIR)/.config
-endif
-ifeq ($(CONFIG_AP_ROUTER),y)
-       cp misc/kernel_config.router $(KERNEL_DIR)/.config
-endif
-       $(MAKE) -C $(KERNEL_DIR) oldconfig
-       $(MAKE) -C $(KERNEL_DIR) dep
-
-sram:
-       $(MAKE) -C alios clean
-       $(MAKE) -C alios SFLAGS=-DCARD_BOOT CONFIGURATION_1=0x1Fc000
-       cp misc/kernel_config.flasher linux/.config
-       $(MAKE) -C $(KERNEL_DIR) oldconfig
-       $(MAKE) -C $(KERNEL_DIR) dep
-       $(MAKE) config_pcmcia
-       $(MAKE) image
-       $(MAKE) -C linux bzImage ROOT_DEV="31 1"
-       echo "`date "+%Y%m%d.%T"` `whoami` `hostname` " \
-               > $(IMAGE_DIR)/etc/i802_version
-       rm -rf `find $(IMAGE_DIR)/* -name *CVS*`
-       cp flash $(IMAGE_DIR)/flash
-       ./misc/build_flash.pl 2097152 sram # 2 * 1024 * 1024
-
-
 
 PCMCIA_DIR   := $(TOPDIR)/pcmcia-cs
 config_pcmcia:
@@ -161,14 +115,7 @@
        fi
 
 kernel:
-       $(MAKE) -C linux oldconfig
-       $(MAKE) -C linux dep
-       $(MAKE) -C linux bzImage ROOT_DEV=$(CONFIG_ROOT_DEV)
-
-
-clean_image:
-       rm -rf $(IMAGE_DIR)/*
-       mkdir -p $(IMAGE_DIR)
+       $(MAKE) -C linux bzImage ROOT_DEV=$(CONFIG_ROOT_DEV) HOSTCC=$(HOSTCC)
 
 install_static:
        mkdir -p $(IMAGE_DIR)/
@@ -248,6 +195,10 @@
        ln -s ../init.d/wireless $(IMAGE_DIR)/etc/rc3.d/S20wireless
 
        ln -s /var/syslogd.socket $(IMAGE_DIR)/dev/log
+
+clean_image:
+       rm -rf $(IMAGE_DIR)/*
+       mkdir -p $(IMAGE_DIR)
        
 flash: image reduce
        echo "`date "+%Y%m%d.%T"` `whoami` `hostname` " \
@@ -256,6 +207,12 @@
        ./misc/build_flash.pl 1048576 flash # 1024 * 1024
        md5sum flash > flash.md5
 
+#####################################################################
+
+
+# Find the symbols needed by executables on the root filesystem.
+# Create a minimal set of shared libraries containing only 
+# those symbols.
 reduce:
        $(INSTALL) -d  $(IMAGE_DIR)/lib
        scripts/mklibs -v \
@@ -266,12 +223,14 @@
            --ldlib=ld-uClibc.so.0 \
            `find $(IMAGE_DIR) -type f -perm +0111`
 
-#####################################################################
-
 menuconfig:
+       [ -f $(TARGET_CONFIG) ] || \
+               (echo "$(TARGET_CONFIG) does not exist!"; exit 1)
        $(MAKE) -C scripts/lxdialog all
        $(CONFIG_SHELL) scripts/Menuconfig $(TARGET_CONFIG)
 
+oldconfig: $(TOPDIR)/.config
+       $(CONFIG_SHELL) scripts/Configure -d $(TARGET_CONFIG)
 
 subdir-y :=
 
@@ -313,6 +272,7 @@
                $(MAKE) -C $$dir clean; \
        done
        $(RM) flash flash.md5
+       rm $(STAMP_DIR)/.configure $(STAMP_DIR)/.tools
 
-.PHONY : uclibc version $(SUBDIRS) flash
+.PHONY : $(SUBDIRS) flash
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]