Merge "Added mechanism to set URI in the regular entity handler's request. This allow...
[platform/upstream/iotivity.git] / buildScript.mk
1 # //******************************************************************
2 # //
3 # // Copyright 2014 Intel Mobile Communications GmbH All Rights Reserved.
4 # //
5 # //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
6 # //
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
10 # //
11 # //      http://www.apache.org/licenses/LICENSE-2.0
12 # //
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.
18 # //
19 # //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
20 #
21
22 # This makefile build-script requires the following for each platform:
23 # Note:  Refer to READMEs at "<oic-resource>/" & "<oic-resource>/csdk/" for
24 #        more information.
25 #
26 # Linux:
27 #    OS: Ubuntu 12.04
28 #    GCC Version: 4.6.1
29 #
30 # Arduino ATMega 2560:
31 #    Framework Version: Arduino 1.0.5
32 #    AVR-GCC Version: 4.5.3
33
34 # Header Description:
35 # ====NAME/TITLE - BUILD TYPE - OUT DIRECTORY====
36
37 all: linux arduinomega
38
39 all_dev: linux_ub_dev arduinomega
40
41 linux: linux_tb linux_ub
42
43 linux_tb: linux_tb_stack linux_tb_unittests linux_tb_examples
44
45 linux_ub: linux_tb linux_ub_stack linux_ub_examples
46
47 linux_tb_stack:
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"
57
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"
63
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"
69
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"
75
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"
81
82 linux_ub_dev: linux
83         @echo "=====BUILD UB OCICUC - <oic-resource>/examples/ocicuc====="
84         $(MAKE) -C examples/ocicuc/
85
86 arduinomega: arduinomega_ethernet
87
88 arduinomega_ethernet: arduinomega_stack_ethernet arduinomega_samples_ethernet
89
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"
100
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"
107
108 linux_clean:
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"
113         $(MAKE) -C . "clean"
114
115 arduinomega_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
120
121 clean:
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"
126         $(MAKE) -C . "clean"
127         $(MAKE) -C oc_logger/ "clean"