1 #
2 # CENS EmStar Repository Master Makefile
3 #
4 # $Id: Makefile,v 1.63 2007-01-29 21:33:57 jhicks Exp $
5 #
6
7 ################### NOTE!!!! ###########################
8 ## Most of the time you want to edit the files called ##
9 ## 'BUILD' and Make.conf, NOT this Makefile. ##
10 ########################################################
11
12
13 ## Sets user-modifiable variables
14 ## e.g. enable TOS, Kernel, native kernel headers, etc
15 include Make.conf
16
17 ## 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 endif
25
26 include make/make.tinyos
27
28 # 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 OBJDIR := obj.$(ARCH)
34
35 # passing target commands down.. is there a better way?
36 # the default target
37 .DEFAULT default: config.make
38 @$(MAKE) -f Makefile.main
39
40 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
49 clean:
50 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
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 @echo ""
67 @echo " make ARCH=<platform> [executable path]"
68 @echo " Builds specified file or all executables and libraries"
69 @echo
70 @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 @echo ""
76 @echo " make test -- runs regression tests."
77 @echo ""
78 @echo " make install-fusd -- installs kfusd module."
79 @echo ""
80 @echo " make help -- provides this message"
81 @echo ""
82 @echo " make config -- runs configure for native platform"
83 @echo ""
84 @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 @echo " stargate builds for Stargate release 7"
91 @echo " nims-stargate builds for Slauson platform"
92 @echo " arm-linux builds for iPAQ"
93 @echo
94 @echo " stargate-ucla builds for Stargate UCLA release 5"
95 @echo " ipaq-sa builds for all StrongARM-based iPAQs (Familiar)"
96 @echo " pasta builds for PASTA"
97 @echo " ilense-104 builds for the ilense testbed"
98 @echo
99 @echo " mica, mica2, mica2dot, cricket, micaz, telos"
100 @echo " build Mote targets"
101 @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 @echo
113 @echo Environment:
114 @echo " NATIVE_KCFLAGS=$(NATIVE_KCFLAGS)"
115 @echo " PKG_CONFIG_PATH=$(PKG_CONFIG_PATH)"
116 @echo " GLIB_PATH=$(GLIB_PATH)"
117 @echo " USE_SHARED='$(USE_SHARED)'"
118 @echo " BUILD_EMTOS='$(BUILD_EMTOS)'"
119 @echo " TOSDIR=$(TOSDIR)"
120 @echo " TOS_CONTRIB=$(TOS_CONTRIB)"
121 @echo " MAKERULES=$(MAKERULES)"
122 @echo " NESC_DIR=$(NESC_DIR)"
123 @echo " AVR_DIR=$(AVR_DIR)"
124 @echo " EMSTAR_MOTE_FREQ=$(EMSTAR_MOTE_FREQ)"
125
126 configure:
127 @echo "Running autoconf..."
128 autoconf
129
130 make/config.h: configure
131 @echo "Running ./configure..."
132 @./configure || ( echo "Configure failed."; exit 1 )
133 touch make/config.h
134
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
This page was automatically generated by the
LXR engine.
Visit the LXR main site for more
information.