(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.62 # $Id: Makefile,v 1.61 2006/02/20 19:06:18 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 girod  1.60 # passing target commands down.. is there a better way?
 36 girod  1.61 # the default target
 37             .DEFAULT default:  config.make
 38             	@$(MAKE) -f Makefile.main 
 39             
 40 girod  1.60 strip:  config.make
 41             	@$(MAKE) -f Makefile.main strip
 42             
 43             test:  config.make
 44             	@$(MAKE) -f Makefile.main test
 45             
 46             install-fusd:  config.make
 47             	@$(MAKE) -f Makefile.main install-fusd
 48 jelson 1.12 
 49             clean:
 50 girod  1.57 	if [[ ! ( . -ef ./$(OBJDIR) ) ]] ; then rm -rf ./$(OBJDIR) ; fi
 51             ifeq ($(strip $(IS_NATIVE)), 1)
 52             	rm -f config.make	
 53             	rm -f make/config.h
 54             endif
 55 girod  1.18 
 56             ##
 57             ##  The 'help' target.
 58             ##  This target provides info about what vars are set and
 59             ##  what platforms are available
 60             ##
 61             
 62             # For debugging purposes, a rule that shows the environment
 63             # and active variables..
 64             help:
 65             	@echo Help:
 66 girod  1.58 	@echo ""
 67 girod  1.18 	@echo " make ARCH=<platform> [executable path]"
 68 girod  1.58 	@echo "   Builds specified file or all executables and libraries"
 69 girod  1.18 	@echo 
 70 girod  1.58 	@echo " make clean ARCH=<platform>"
 71             	@echo "   deletes all built files."
 72             	@echo ""
 73             	@echo " make strip ARCH=<platform>"
 74             	@echo "   strips symbols from all executables."
 75 girod  1.60 	@echo ""
 76             	@echo " make test -- runs regression tests."
 77             	@echo ""
 78             	@echo " make install-fusd -- installs kfusd module."
 79 girod  1.58 	@echo ""
 80             	@echo " make help -- provides this message"
 81             	@echo ""
 82             	@echo " make config -- runs configure for native platform"
 83             	@echo ""
 84 girod  1.18 	@echo " EmStar supports the following platforms:"
 85             	@echo 
 86             	@echo "  i686-linux (default) is the 'native' platform"
 87             	@echo "    used to buld to run on your host.  Check Make.conf"
 88             	@echo "    to locally customize the native platform."
 89             	@echo 
 90 girod  1.58 	@echo "  stargate builds for Stargate release 7"
 91             	@echo "  nims-stargate builds for Slauson platform"
 92 girod  1.18 	@echo "  arm-linux builds for iPAQ"
 93 girod  1.58 	@echo 
 94             	@echo "  stargate-ucla builds for Stargate UCLA release 5"
 95 eugene 1.31 	@echo "  ipaq-sa builds for all StrongARM-based iPAQs (Familiar)"
 96 girod  1.18 	@echo "  pasta builds for PASTA"
 97 girod  1.34 	@echo "  ilense-104 builds for the ilense testbed"
 98 girod  1.18 	@echo 
 99 girod  1.58 	@echo "  mica, mica2, mica2dot, cricket, micaz, telos"
100             	@echo "        build Mote targets"
101 girod  1.59 	@echo
102             	@echo "  mica2 frequency selection by separate platforms:"
103             	@echo "     mica2-433        (freq '0')"
104             	@echo "     mica2-433-alt    (freq '2')"
105             	@echo "     mica2-918        (freq '1')"
106             	@echo "     mica2-918-alt    (freq '3')"
107             	@echo
108             	@echo "  mica2 does not set a frequency; you can define it by"
109             	@echo "     passing make EMSTAR_MOTE_FREQ=-DCC1K_DEFAULT_FREQ=xxx."
110             	@echo "     Please avoid adding this TinyOS Makefiles, so "
111             	@echo "     that people do not see unexpected frequency settings."
112 girod  1.18 	@echo 
113             	@echo Environment:
114             	@echo " NATIVE_KCFLAGS=$(NATIVE_KCFLAGS)"
115 girod  1.29 	@echo " PKG_CONFIG_PATH=$(PKG_CONFIG_PATH)"
116             	@echo " GLIB_PATH=$(GLIB_PATH)"
117 girod  1.26 	@echo " USE_SHARED='$(USE_SHARED)'"
118             	@echo " BUILD_EMTOS='$(BUILD_EMTOS)'"
119 girod  1.21 	@echo " TOSDIR=$(TOSDIR)"
120             	@echo " TOS_CONTRIB=$(TOS_CONTRIB)"
121             	@echo " MAKERULES=$(MAKERULES)"
122 girod  1.18 	@echo " NESC_DIR=$(NESC_DIR)"
123             	@echo " AVR_DIR=$(AVR_DIR)"
124 girod  1.59 	@echo " EMSTAR_MOTE_FREQ=$(EMSTAR_MOTE_FREQ)"
125 girod  1.18 
126 girod  1.58 configure:
127             	@echo "Running autoconf..."
128             	autoconf
129             
130 girod  1.62 make/config.h: configure
131 girod  1.58 	@echo "Running ./configure..."
132             	@./configure || ( echo "Configure failed."; exit 1 )
133 girod  1.62 	touch make/config.h
134 girod  1.58 
135             ifeq ($(strip $(IS_NATIVE)), 1)
136             config.make:  make/config.h 
137             	@echo "Building config.make..."
138             	perl make/htosh.pl $(PWD)
139             else
140             config.make:  
141             	@true
142             endif

CENS CVS Mailing List
Powered by
ViewCVS 0.9.2