Add some modifications (space, new line, coma, float).
[src/low-level-can-generator.git] / Makefile
1 # Copyright (C) 2015, 2016 "IoT.bzh"
2 # Author "Romain Forlot" <romain.forlot@iot.bzh>
3 #
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
7 #
8 #        http://www.apache.org/licenses/LICENSE-2.0
9 #
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
15
16 BUILD_DIR   := build
17
18 .PHONY: all clean mrproper ${BUILD_DIR}/Makefile
19
20 all: build package
21
22 clean:
23         @([ -d ${BUILD_DIR} ] && make -C ${BUILD_DIR} clean) || echo Nothing to clean
24
25 mrproper:
26         rm -rf ${BUILD_DIR}
27
28 build:  ${BUILD_DIR}/Makefile
29         cmake --build ${BUILD_DIR} --clean-first
30
31
32 package:
33         cmake --build ${BUILD_DIR} --target widget
34
35 ${BUILD_DIR}/Makefile:
36         @[ -d ${BUILD_DIR} ] || mkdir -p ${BUILD_DIR}
37         @[ -f ${BUILD_DIR}/Makefile ] || (cd ${BUILD_DIR} && cmake ${CMAKE_OPTS} ..)