openap-cvs
[Top][All Lists]
Advanced

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

[openap-cvs] : openap-main Makefile,1.21,1.22


From: David Kimdon <address@hidden>
Subject: [openap-cvs] : openap-main Makefile,1.21,1.22
Date: Fri, 09 Aug 2002 18:51:39 -0400

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

Modified Files:
        Makefile 
Log Message:
pcmcia stuff moved to subdir
all apps moved into the apps subdir
put uclibc building rules in here



Index: Makefile
===================================================================
RCS file: /cvsroot/openap/openap-main/Makefile,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- Makefile    8 Aug 2002 20:47:58 -0000       1.21
+++ Makefile    9 Aug 2002 22:51:37 -0000       1.22
@@ -23,14 +23,19 @@
          else if [ -x /bin/bash ]; then echo /bin/bash; \
          else echo sh; fi ; fi)
 
-OPENAP_VERSION         =  pre0.1.3
+OPENAP_VERSION         =  0.1.3
 TOPDIR         := $(shell pwd)
-STAMPDIR       =  $(TOPDIR)
 IMAGE_DIR      =  $(TOPDIR)/Image_final
 DESTDIR                =  $(IMAGE_DIR)
 TARGET_CONFIG  =  $(TOPDIR)/config/$(TARGET)/config.in
 
-include $(TOPDIR)/Rules.mk
+# load configuration variables
+ifeq (.config,$(wildcard .config))
+include .config
+endif
+
+# load target specific rules and variables
+include $(TOPDIR)/config/$(TARGET)/rules.mk
 
 # If we are doing a build to be run on the native system we don't
 # set these variables.  We will instead use whatever tools the
@@ -38,7 +43,7 @@
 ifneq ($(FLAVOR),native)
 # The echo's are just to remove leading and trailing quotes.
 KERNEL_DIR      =  $(TOPDIR)/linux
-CONFIG_PREFIX  := $(shell echo $(CONFIG_PREFIX))
+CONFIG_PREFIX  = /opt/openap-$(OPENAP_VERSION)
 CONFIG_TARGET  := $(shell echo $(CONFIG_TARGET))
 TARGET_PATH    =  $(CONFIG_PREFIX)/$(CONFIG_TARGET)
 TOOLDIR                =  $(TARGET_PATH)
@@ -47,11 +52,8 @@
 CROSS_COMPILE  =  $(CONFIG_TARGET)-
 MKLIBSFLAGS    = --no-default-lib  -L $(CONFIG_PREFIX)/$(CONFIG_TARGET)/lib \
                  --target=$(CONFIG_TARGET)
-PCMCIA_DIR     =  $(TOPDIR)/pcmcia-cs
 else
-# FIXME: KERNEL_DIR,PCMCIA_DIR are configurable parameters they
-# need to move to a better place
-PCMCIA_DIR     = $(TOPDIR)/pcmcia-cs
+# FIXME: KERNEL_DIR is configurable needs to move to a better place
 KERNEL_DIR      =  /usr/src/linux
 endif
 
@@ -77,16 +79,15 @@
        CONFIG_TARGET ARCH TARGET BUILD_HOST BUILD_CC \
        TARGET_CC STRIPFLAGS KERNEL_DIR MAKEFLAGS CROSS_COMPILE
 
-bootstrap: tools configure config_pcmcia kernel
+bootstrap: configure kernel
 
 # This makes no sense for a native build
 ifneq ($(FLAVOR),native)
-configure: $(STAMPDIR)/.configure config_pcmcia
-$(STAMPDIR)/.configure: $(KERNEL_DIR)/.config $(TOPDIR)/.config
+configure:
        $(MAKE) -C $(KERNEL_DIR) oldconfig
        $(MAKE) -C $(KERNEL_DIR) dep HOSTCC=$(HOSTCC)
        $(MAKE) oldconfig
-       touch $(STAMPDIR)/.configure
+       $(MAKE) -C apps/pcmcia-cs config_pcmcia
 endif
 
 # Convienience target, create a cross shell, tool will act as normal, but 
@@ -95,30 +96,6 @@
        env
        $(CONFIG_SHELL)
 
-PCMCIA_OPTS=--kernel=$(KERNEL_DIR) --target=$(IMAGE_DIR) --trust --nocardbus \
-       --nopnp --noapm --ld=$(LD) --ucc=$(CC) --kcc=$(CC) --srctree
-
-ifneq ($(FLAVOR),native)
-PCMCIA_OPTS+=-n
-endif
-
-config_pcmcia:
-       @if [ ! -L $(PCMCIA_DIR)/PCMCIA-HOWTO ] ; then \
-               ln -s doc/PCMCIA-HOWTO $(PCMCIA_DIR)/PCMCIA-HOWTO ; \
-               ln -s ../pcmcia/config.h $(PCMCIA_DIR)/include/linux/compile.h 
; \
-               ln -s ../pcmcia/config.h $(PCMCIA_DIR)/include/linux/config.h ; 
\
-               ln -s ../pcmcia/config.h $(PCMCIA_DIR)/include/linux/version.h 
; \
-               mkdir -p $(PCMCIA_DIR)/include/static/asm ; \
-               mkdir -p $(PCMCIA_DIR)/include/static/linux ; \
-               mkdir -p $(PCMCIA_DIR)/include/static/pcmcia ; \
-               ln -s ../asm $(PCMCIA_DIR)/include/static/asm ; \
-               ln -s ../linux $(PCMCIA_DIR)/include/static/linux ; \
-               ln -s ../../pcmcia/ciscode.h 
$(PCMCIA_DIR)/include/static/pcmcia/ciscode.h ; \
-       fi
-
-       cd $(PCMCIA_DIR) ; \
-       $(PCMCIA_DIR)/Configure $(PCMCIA_OPTS)
-
 kernel:
        $(MAKE) -C linux bzImage ROOT_DEV=$(CONFIG_ROOT_DEV) HOSTCC=$(HOSTCC)
 
@@ -126,12 +103,7 @@
        rm -rf $(IMAGE_DIR)/*
        mkdir -p $(IMAGE_DIR)
 
-image: install reduce
-       echo "`date "+%Y%m%d.%T"` `whoami` `hostname` " \
-               > $(IMAGE_DIR)/etc/i802_version
-       rm -rf `find $(IMAGE_DIR)/* -name *CVS*`
-       ./misc/build_flash.pl 1048576 flash # 1024 * 1024
-       md5sum flash > flash.md5
+image: install reduce $(EXTRA_IMAGE_TARGETS)
 
 #####################################################################
 
@@ -141,7 +113,7 @@
 # those symbols.
 reduce:
        $(INSTALL) -d  $(IMAGE_DIR)/lib
-       scripts/mklibs $(MKLIBSFLAGS) \
+       scripts/mklibs -v -v $(MKLIBSFLAGS) \
            `find $(IMAGE_DIR) -type f -perm +0111`
 
 menuconfig:
@@ -156,15 +128,15 @@
        cp config/autoconf.h linux/include/linux
 
 subdir-y                               += rootskel
-subdir-$(CONFIG_UDHCP)                         += udhcp
-subdir-$(CONFIG_WIRELESS_TOOLS)        += wireless-tools
-subdir-$(CONFIG_ALIOS)                         += alios
-subdir-$(CONFIG_BRIDGE_UTILS)          += bridge-utils
-subdir-$(CONFIG_PCMCIA_CS)             += pcmcia-cs
-subdir-$(CONFIG_BUSYBOX)               += busybox
-subdir-$(CONFIG_ERASE)                 += erase
-subdir-$(CONFIG_IPTABLES)              += iptables
-subdir-$(CONFIG_PRISM2)                        += prism2
+subdir-$(CONFIG_UDHCP)                         += apps/udhcp
+subdir-$(CONFIG_WIRELESS_TOOLS)        += apps/wireless-tools
+subdir-$(CONFIG_ALIOS)                         += apps/alios
+subdir-$(CONFIG_BRIDGE_UTILS)          += apps/bridge-utils
+subdir-$(CONFIG_PCMCIA_CS)             += apps/pcmcia-cs
+subdir-$(CONFIG_BUSYBOX)               += apps/busybox
+subdir-$(CONFIG_ERASE)                 += apps/erase
+subdir-$(CONFIG_IPTABLES)              += apps/iptables
+subdir-$(CONFIG_PRISM2)                        += apps/prism2
 
 SUBDIRS= $(subdir-y)
 
@@ -185,6 +157,7 @@
 
 # install files into target directory
 install: subdirs
+       rm -rf $(IMAGE_DIR) 
        @for dir in $(SUBDIRS) ; do \
                if ! $(MAKE) -C $$dir -f facility/rules install \
                        IMAGE_DIR=$(IMAGE_DIR) ; then \
@@ -199,6 +172,34 @@
        done
        $(RM) flash flash.md5 $(STAMPDIR)/.configure
 
+tools: uclibc $(EXTRA_TOOLS_TARGETS)
+
+uclibc:
+       mkdir -p $(CONFIG_PREFIX) || \
+               (echo "failed to create $(CONFIG_PREFIX)"; exit 1)
+       mkdir -p uclibc-build/
+       -cd uclibc-build/gcc-2.95 && $(MAKE) clean
+       cd uclibc-build && \
+           tar -xzf ../misc/gcc-2.95-uclibc-20020711-1.src.tar.gz
+       
+       # For the tool build we don't want these variables defined 
+       # since we need to use the native host toolchain.
+       export -n CC LD AS AR STRIP CONFIG_SITE; \
+       cd uclibc-build/gcc-2.95 && make \
+               TARGET_PATH=$(TARGET_PATH) \
+               ARCH=$(ARCH)
+       @echo
+       @echo "Put $(TARGET_PATH)/bin/ at the end of your PATH."
+       @echo
+
+LIBS=libpcap libnet
+
+libs:
+       for dir in $(LIBS) ; do \
+               if ! ( cd $$dir && $(MAKE) -f ./i802/rules install) ; then \
+                       exit 1 ; \
+               fi \
+       done
 
 -include $(addsuffix /facility/rules.mk,$(subdir-y)) 
 





reply via email to

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