(file) Return to Makefile CVS log (file) Jump to this file's LXR Page (dir) Up to [CENS] / emstar

  1 jelson 1.1 #
  2 jelson 1.17 # CENS EmStar Repository Master Makefile
  3 jelson 1.1  #
  4 girod  1.58 # $Id: Makefile,v 1.57 2006/01/27 05:04:57 girod Exp $
  5 jelson 1.1  #
  6             
  7 jelson 1.2  ################### NOTE!!!! ###########################
  8             ## Most of the time you want to edit the files called ##
  9 girod  1.18 ## 'BUILD' and Make.conf, NOT this Makefile.          ##
 10 jelson 1.2  ########################################################
 11             
 12 girod  1.57 
 13 girod  1.20 ## Sets user-modifiable variables
 14             ## e.g. enable TOS, Kernel, native kernel headers, etc
 15 girod  1.18 include Make.conf
 16 girod  1.29 
 17 girod  1.58 ## If this is the native arch, include config.make
 18             ifeq ($(strip $(ARCH)),i686-linux)
 19               IS_NATIVE=1
 20             else
 21               ifeq ($(ARCH),)
 22                 IS_NATIVE=1
 23               endif
 24 girod  1.29 endif
 25             
 26 girod  1.57 include make/make.tinyos
 27 girod  1.29 
 28 jelson 1.7  # Set platform-dependent variables.  Including this fragment sets:
 29             #  ARCH -- the target architecture (e.g., arm-linux or i686-linux)
 30             #  NATIVE_ARCH -- the architecture we're compiling under
 31             #  CC, CPP, AR, LD, BINSTRIP -- paths to various utils
 32             include make/make.platform
 33 jelson 1.1  OBJDIR := obj.$(ARCH)
 34 mlukac 1.43 
 35 jelson 1.12 # the default target
 36 girod  1.58 .DEFAULT default:  config.make
 37 girod  1.57 	@make -f Makefile.main $0
 38 jelson 1.12 
 39             clean:
 40 girod  1.57 	if [[ ! ( . -ef ./$(OBJDIR) ) ]] ; then rm -rf ./$(OBJDIR) ; fi
 41             ifeq ($(strip $(IS_NATIVE)), 1)
 42             	rm -f config.make	
 43             	rm -f make/config.h
 44             endif
 45 girod  1.18 
 46             ##
 47             ##  The 'help' target.
 48             ##  This target provides info about what vars are set and
 49             ##  what platforms are available
 50             ##
 51             
 52             # For debugging purposes, a rule that shows the environment
 53             # and active variables..
 54             help:
 55             	@echo Help:
 56 girod  1.58 	@echo ""
 57 girod  1.18 	@echo " make ARCH=<platform> [executable path]"
 58 girod  1.58 	@echo "   Builds specified file or all executables and libraries"
 59 girod  1.18 	@echo 
 60 girod  1.58 	@echo " make clean ARCH=<platform>"
 61             	@echo "   deletes all built files."
 62             	@echo ""
 63             	@echo " make strip ARCH=<platform>"
 64             	@echo "   strips symbols from all executables."
 65             	@echo ""
 66             	@echo " make help -- provides this message"
 67             	@echo ""
 68             	@echo " make config -- runs configure for native platform"
 69             	@echo ""
 70 girod  1.18 	@echo " EmStar supports the following platforms:"
 71             	@echo 
 72             	@echo "  i686-linux (default) is the 'native' platform"
 73             	@echo "    used to buld to run on your host.  Check Make.conf"
 74             	@echo "    to locally customize the native platform."
 75             	@echo 
 76 girod  1.58 	@echo "  stargate builds for Stargate release 7"
 77             	@echo "  nims-stargate builds for Slauson platform"
 78 girod  1.18 	@echo "  arm-linux builds for iPAQ"
 79 girod  1.58 	@echo 
 80             	@echo "  stargate-ucla builds for Stargate UCLA release 5"
 81 eugene 1.31 	@echo "  ipaq-sa builds for all StrongARM-based iPAQs (Familiar)"
 82 girod  1.18 	@echo "  pasta builds for PASTA"
 83 girod  1.34 	@echo "  ilense-104 builds for the ilense testbed"
 84 girod  1.18 	@echo 
 85 girod  1.58 	@echo "  mica, mica2, mica2dot, cricket, micaz, telos"
 86             	@echo "        build Mote targets"
 87 girod  1.18 	@echo 
 88             	@echo Environment:
 89             	@echo " NATIVE_KCFLAGS=$(NATIVE_KCFLAGS)"
 90 girod  1.29 	@echo " PKG_CONFIG_PATH=$(PKG_CONFIG_PATH)"
 91             	@echo " GLIB_PATH=$(GLIB_PATH)"
 92 girod  1.26 	@echo " USE_SHARED='$(USE_SHARED)'"
 93             	@echo " BUILD_EMTOS='$(BUILD_EMTOS)'"
 94 girod  1.21 	@echo " TOSDIR=$(TOSDIR)"
 95             	@echo " TOS_CONTRIB=$(TOS_CONTRIB)"
 96             	@echo " MAKERULES=$(MAKERULES)"
 97 girod  1.18 	@echo " NESC_DIR=$(NESC_DIR)"
 98             	@echo " AVR_DIR=$(AVR_DIR)"
 99             
100 girod  1.58 configure:
101             	@echo "Running autoconf..."
102             	autoconf
103             
104             config make/config.h: configure
105             	@echo "Running ./configure..."
106             	@./configure || ( echo "Configure failed."; exit 1 )
107             
108             ifeq ($(strip $(IS_NATIVE)), 1)
109             config.make:  make/config.h 
110             	@echo "Building config.make..."
111             	perl make/htosh.pl $(PWD)
112             else
113             config.make:  
114             	@true
115             endif

CENS CVS Mailing List
Powered by
ViewCVS 0.9.2