Main Page | Data Structures | Directories | File List | Data Fields | Globals

Makefile.inc

Go to the documentation of this file.
00001 #
00002 # Copyright (c) 2002-2004 Sam Leffler, Errno Consulting
00003 # All rights reserved.
00004 #
00005 # Redistribution and use in source and binary forms, with or without
00006 # modification, are permitted provided that the following conditions
00007 # are met:
00008 # 1. Redistributions of source code must retain the above copyright
00009 #    notice, this list of conditions and the following disclaimer,
00010 #    without modification.
00011 # 2. Redistributions in binary form must reproduce at minimum a disclaimer
00012 #    similar to the "NO WARRANTY" disclaimer below ("Disclaimer") and any
00013 #    redistribution must be conditioned upon including a substantially
00014 #    similar Disclaimer requirement for further binary redistribution.
00015 # 3. Neither the names of the above-listed copyright holders nor the names
00016 #    of any contributors may be used to endorse or promote products derived
00017 #    from this software without specific prior written permission.
00018 #
00019 # Alternatively, this software may be distributed under the terms of the
00020 # GNU General Public License ("GPL") version 2 as published by the Free
00021 # Software Foundation.
00022 #
00023 # NO WARRANTY
00024 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
00025 # ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
00026 # LIMITED TO, THE IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTIBILITY
00027 # AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
00028 # THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY,
00029 # OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
00030 # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
00031 # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
00032 # IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
00033 # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
00034 # THE POSSIBILITY OF SUCH DAMAGES.
00035 #
00036 # $Id: Makefile.inc,v 1.8 2004/08/16 20:06:21 jbicket Exp $
00037 #
00038 
00039 
00040 # KERNELPATH= /home/jbicket/co/linux-2.4.26.rpm
00041 ifeq ($(obj),)
00042 obj=    .
00043 endif
00044 
00045 # other locales sometimes cause trouble
00046 export LC_ALL = POSIX
00047 
00048 #
00049 OS=             linux
00050 #
00051 # TARGET defines the target platform ISA per GNU rules.
00052 # It must match one of the target platforms supported by
00053 # the HAL.  To set the set of target platforms look at
00054 # hal/linux/*.inc.  You can set this in the environment
00055 # to override the default setting.
00056 #
00057 ifeq ($(TARGET),)
00058 TARGET=         i386-elf
00059 endif
00060 
00061 # BUS defines the bus type to which the wireless devices is attached.
00062 # Currently, the valid BUS types are PCI and LBUS.  If BUS is not
00063 # defined, then, we assume the bus type is PCI
00064 
00065 ifndef BUS
00066 BUS=            PCI
00067 endif
00068 
00069 # If we are LBUS type, then we need the kernel path for the target
00070 # kernel sources.
00071 
00072 ifeq ($(strip ${BUS}),LBUS)
00073 TARGET=         mipsisa32-be-elf
00074 
00075 ifndef KERNELPATH
00076 $(error KERNELPATH must be defined for bus type LBUS.)
00077 endif
00078 
00079 KERNELCONF=     ${KERNELPATH}/.config
00080 
00081 ifndef KERNELRELEASE
00082 VERSION := $(strip $(shell head -n 1 ${KERNELPATH}/Makefile | cut -f 2 -d'='))
00083 PATCHLEVEL := $(strip $(shell head -n 2 ${KERNELPATH}/Makefile | tail -1 | cut -f 2 -d'='))
00084 SUBVERSION := $(strip $(shell head -n 3 ${KERNELPATH}/Makefile | tail -1 | cut -f 2 -d'='))
00085 
00086 KERNELRELEASE := $(strip ${VERSION}.${PATCHLEVEL}.${SUBVERSION})
00087 endif
00088 
00089 ifndef MODULEPATH
00090 MODULEPATH :=   ${KERNELPATH}/arch/mips/ar531x/RAMDISK/rootdir/lib/modules/${KERNELRELEASE}/net
00091 endif
00092 
00093 endif   
00094         
00095 
00096 NM=             nm
00097 AWK=            awk
00098 
00099 # Path to the Linux kernel, include files, etc.
00100 #
00101 # KERNELRELEASE is the target kernel's version.  If KERNELRELEASE
00102 # is not set in the environment then it is taken from the running
00103 # system.
00104 #
00105 # KERNELPATH is the path to the target kernel's build/source area.
00106 # This is used to obtain the kernel configuration and include files.
00107 # If KERNELPATH is not set in the environment then it is derived
00108 # from KERNELRELEASE.
00109 #
00110 ifeq ($(KERNELRELEASE),)
00111 KERNELRELEASE = $(shell uname -r)
00112 endif
00113 
00114 ifneq ($(findstring 2.6,$(KERNELRELEASE)),)
00115 export-objs     :=
00116 list-multi      :=
00117 KMODSUF         := ko
00118 else
00119 KMODSUF         := o
00120 endif
00121 
00122 ifeq ($(KERNELPATH),)
00123 KERNELPATH=     /lib/modules/${KERNELRELEASE}/build
00124 endif
00125 
00126 ifeq ($(DESTDIR),)
00127 DESTDIR=
00128 endif
00129 
00130 ifeq ($(MODULEPATH),)
00131 MODULEPATH=     /lib/modules/${KERNELRELEASE}/net
00132 endif
00133 
00134 #
00135 # Path to the HAL source code.
00136 #
00137 ifeq ($(HAL),)
00138 HAL=${DEPTH}/openhal
00139 endif
00140 #
00141 # Path to the HAL build area.
00142 #
00143 ATH_HAL=${DEPTH}/openhal
00144 #
00145 # Path to the 802.11 include files.
00146 #
00147 WLAN=   ${DEPTH}/wlan
00148 #
00149 # Path to the device driver.
00150 #
00151 DRIVER= ${DEPTH}/driver
00152 
00153 
00154 STRIP= strip

Generated on Mon Nov 21 15:58:10 2005 for openwifi by  doxygen 1.4.1