1 jelson 1.1 #
|
2 jelson 1.17 # CENS EmStar Repository Master Makefile
|
3 jelson 1.1 #
|
4 girod 1.59 # $Id: Makefile,v 1.58 2006/01/27 06:14:31 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.59 @echo
88 @echo " mica2 frequency selection by separate platforms:"
89 @echo " mica2-433 (freq '0')"
90 @echo " mica2-433-alt (freq '2')"
91 @echo " mica2-918 (freq '1')"
92 @echo " mica2-918-alt (freq '3')"
93 @echo
94 @echo " mica2 does not set a frequency; you can define it by"
95 @echo " passing make EMSTAR_MOTE_FREQ=-DCC1K_DEFAULT_FREQ=xxx."
96 @echo " Please avoid adding this TinyOS Makefiles, so "
97 @echo " that people do not see unexpected frequency settings."
|
98 girod 1.18 @echo
99 @echo Environment:
100 @echo " NATIVE_KCFLAGS=$(NATIVE_KCFLAGS)"
|
101 girod 1.29 @echo " PKG_CONFIG_PATH=$(PKG_CONFIG_PATH)"
102 @echo " GLIB_PATH=$(GLIB_PATH)"
|
103 girod 1.26 @echo " USE_SHARED='$(USE_SHARED)'"
104 @echo " BUILD_EMTOS='$(BUILD_EMTOS)'"
|
105 girod 1.21 @echo " TOSDIR=$(TOSDIR)"
106 @echo " TOS_CONTRIB=$(TOS_CONTRIB)"
107 @echo " MAKERULES=$(MAKERULES)"
|
108 girod 1.18 @echo " NESC_DIR=$(NESC_DIR)"
109 @echo " AVR_DIR=$(AVR_DIR)"
|
110 girod 1.59 @echo " EMSTAR_MOTE_FREQ=$(EMSTAR_MOTE_FREQ)"
|
111 girod 1.18
|
112 girod 1.58 configure:
113 @echo "Running autoconf..."
114 autoconf
115
116 config make/config.h: configure
117 @echo "Running ./configure..."
118 @./configure || ( echo "Configure failed."; exit 1 )
119
120 ifeq ($(strip $(IS_NATIVE)), 1)
121 config.make: make/config.h
122 @echo "Building config.make..."
123 perl make/htosh.pl $(PWD)
124 else
125 config.make:
126 @true
127 endif
|