1 # //******************************************************************
3 # // Copyright 2014 Intel Mobile Communications GmbH All Rights Reserved.
5 # //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
7 # // Licensed under the Apache License, Version 2.0 (the "License");
8 # // you may not use this file except in compliance with the License.
9 # // You may obtain a copy of the License at
11 # // http://www.apache.org/licenses/LICENSE-2.0
13 # // Unless required by applicable law or agreed to in writing, software
14 # // distributed under the License is distributed on an "AS IS" BASIS,
15 # // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 # // See the License for the specific language governing permissions and
17 # // limitations under the License.
19 # //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
22 # This makefile build-script requires the following for each platform:
23 # Note: Refer to READMEs at "<oic-resource>/" & "<oic-resource>/csdk/" for
30 # Arduino ATMega 2560:
31 # Framework Version: Arduino 1.0.5
32 # AVR-GCC Version: 4.5.3
35 # ====NAME/TITLE - BUILD TYPE - OUT DIRECTORY====
37 all: linux arduinomega
39 all_dev: linux_ub_dev arduinomega
41 linux: linux_tb linux_ub
43 linux_tb: linux_tb_stack linux_tb_unittests linux_tb_examples
45 linux_ub: linux_tb linux_ub_stack linux_ub_examples
48 @echo "=====BUILD FOR LINUX - UBUNTU 12.04===="
49 @echo "=====BUILD LIBCOAP - DEBUG - <oic-resource>/csdk/libcoap/linux/debug/====="
50 $(MAKE) -C csdk/libcoap "BUILD=debug" "PLATFORM=linux"
51 @echo "=====BUILD LIBCOAP - RELEASE - <oic-resource>/csdk/libcoap/linux/release/====="
52 $(MAKE) -C csdk/libcoap "BUILD=release" "PLATFORM=linux"
53 @echo "=====BUILD TB STACK - DEBUG - <oic-resource>/csdk/linux/debug/====="
54 $(MAKE) -C csdk/ "buildScript_all" "BUILD=debug" "PLATFORM=linux"
55 @echo "=====BUILD TB STACK - RELEASE - <oic-resource>/csdk/linux/release/====="
56 $(MAKE) -C csdk/ "buildScript_all" "BUILD=release" "PLATFORM=linux"
58 linux_tb_unittests: linux_tb_stack
59 @echo "=====BUILD TB UNITTESTS - DEBUG - <oic-resource>/csdk/stack/test/linux/debug/====="
60 $(MAKE) -C csdk/stack/test/linux/ "BUILD=debug"
61 @echo "=====BUILD TB UNITTESTS - RELEASE - <oic-resource>/csdk/stack/test/linux/release/====="
62 $(MAKE) -C csdk/stack/test/linux/ "BUILD=release"
64 linux_tb_examples: linux_tb_stack
65 @echo "=====BUILD TB SAMPLE APPS - DEBUG - <oic-resource>/csdk/stack/samples/linux/SimpleClientServer/debug/====="
66 $(MAKE) -C csdk/stack/samples/linux/SimpleClientServer "PLATFORM=linux" "BUILD=debug"
67 @echo "=====BUILD TB SAMPLE APPS - RELEASE - <oic-resource>/csdk/stack/samples/linux/SimpleClientServer/release/====="
68 $(MAKE) -C csdk/stack/samples/linux/SimpleClientServer "PLATFORM=linux" "BUILD=release"
70 linux_ub_stack: linux_tb_stack
71 @echo "=====BUILD UB STACK AND SAMPLE APPS AND OCICUC - DEBUG - <oic-resource>/debug/====="
72 $(MAKE) -C ./ "buildScript_all" "BUILD=debug"
73 @echo "=====BUILD UB STACK AND SAMPLE APPS AND OCICUC - RELEASE - <oic-resource>/release/====="
74 $(MAKE) -C ./ "buildScript_all" "BUILD=release"
76 linux_ub_examples: linux_ub_stack
77 @echo "=====BUILD UB SAMPLE APPS - DEBUG - <oic-resource>/examples/debug====="
78 $(MAKE) -C examples/ "buildScript_all" "BUILD=debug"
79 @echo "=====BUILD UB SAMPLE APPS - RELEASE - <oic-resource>/examples/release====="
80 $(MAKE) -C examples/ "buildScript_all" "BUILD=release"
83 @echo "=====BUILD UB OCICUC - <oic-resource>/examples/ocicuc====="
84 $(MAKE) -C examples/ocicuc/
86 arduinomega: arduinomega_ethernet
88 arduinomega_ethernet: arduinomega_stack_ethernet arduinomega_samples_ethernet
90 arduinomega_stack_ethernet:
91 @echo "=====BUILD C STACK FOR ARDUINO ATMEGA 2560 - ETHERNET SHIELD======"
92 @echo "=====BUILD LIBCOAP - DEBUG - <oic-resource>/csdk/libcoap/arduinomega/ethernet_shield/debug/====="
93 $(MAKE) -C csdk/libcoap "BUILD=debug" "PLATFORM=arduinomega" "ARDUINOWIFI=0"
94 @echo "=====BUILD LIBCOAP - RELEASE - <oic-resource>/csdk/libcoap/arduinomega/ethernet_shield/release/====="
95 $(MAKE) -C csdk/libcoap "BUILD=release" "PLATFORM=arduinomega" "ARDUINOWIFI=0"
96 @echo "=====BUILD TB STACK - DEBUG - <oic-resource>/csdk/arduinomega/ethernet_shield/debug/====="
97 $(MAKE) -C csdk "buildScript_all" "BUILD=debug" "PLATFORM=arduinomega" "ARDUINOWIFI=0"
98 @echo "=====BUILD TB STACK - RELEASE - <oic-resource>/csdk/arduinomega/ethernet_shield/release/====="
99 $(MAKE) -C csdk "buildScript_all" "BUILD=release" "PLATFORM=arduinomega" "ARDUINOWIFI=0"
101 arduinomega_samples_ethernet:
102 @echo "=====BUILD TB SAMPLE APPS FOR ARDUINO ATMEGA 2560 - ETHERNET SHIELD====="
103 @echo "=====BUILD OCSERVER - DEBUG - <oic-resource>/csdk/stack/samples/arduino/SimpleClientServer/ocserver/arduinomega/ethernet_shield/debug/====="
104 $(MAKE) -C csdk/stack/samples/arduino/SimpleClientServer/ocserver "BUILD=debug" "PLATFORM=arduinomega" "ARDUINOWIFI=0"
105 @echo "=====BUILD OCSERVER - RELEASE - <oic-resource>/csdk/stack/samples/arduino/SimpleClientServer/ocserver/arduinomega/ethernet_shield/release/====="
106 $(MAKE) -C csdk/stack/samples/arduino/SimpleClientServer/ocserver "BUILD=release" "PLATFORM=arduinomega" "ARDUINOWIFI=0"
109 -rm -rf -C csdk/libcoap/linux
110 -rm -rf -C csdk/linux
111 $(MAKE) -C csdk/stack/test/linux "clean"
112 $(MAKE) -C csdk/stack/samples/linux/SimpleClientServer "clean"
116 -rm -rf csdk/libcoap/arduinomega
117 -rm -rf csdk/arduinomega
118 -rm -rf csdk/stack/test/arduino/arduinomega
119 -rm -rf csdk/stack/samples/arduino/SimpleClientServer/ocserver/arduinomega
122 $(MAKE) -C csdk "clean" "deepclean"
123 $(MAKE) -C csdk/stack/test/linux "clean"
124 $(MAKE) -C csdk/stack/samples/linux/SimpleClientServer "clean"
125 $(MAKE) -C csdk/stack/samples/arduino/SimpleClientServer/ocserver "clean"
127 $(MAKE) -C oc_logger/ "clean"