Re-organized sub-directory by category
[staging/basesystem.git] / service / peripheral / communication / server / Makefile
1 #
2 # @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
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
17 ######### add source path #############
18
19 ######### installed program #############
20 INST_PROGS = communication
21
22 ######### installed library(*.a) #############
23
24 ######### installed shared library(*.so) #############
25
26 ######### compiled sources  #############
27
28 ## from ./src/main
29 communication_SRCS += ./src/main/communication_main.cpp
30 communication_SRCS += ./src/main/communication_application.cpp
31
32 ## from ./src/threads
33 communication_SRCS += ./src/threads/CAN_Thread.cpp
34 communication_SRCS += ./src/threads/Thread_Common.cpp
35
36 ## from ./src/CAN/CommWatch/
37 communication_SRCS += ./src/CAN/CommWatch/CAN_CommWatch.cpp
38
39 ## from ./src/CAN/Delivery/
40 communication_SRCS += ./src/CAN/Delivery/CAN_Delivery.cpp
41
42 ## from ./src/CAN/TxMsg/
43 communication_SRCS += ./src/CAN/TxMsg/CAN_TxMsg.cpp
44
45 ######### add source path #############
46 VPATH += \
47         ./src/CAN/Command \
48         ./src/CAN/CommWatch  \
49         ./src/CAN/Delivery  \
50         ./src/CAN/main  \
51         ./src/CAN/TxMsg  \
52     ./src/main  \
53         
54
55 ######### add include path #############
56 CPPFLAGS += \
57         -I./../client_can/include \
58         -I./include \
59         -I./include/CAN/Command  \
60         -I./include/CAN/CommWatch  \
61         -I./include/CAN/Delivery  \
62         -I./include/CAN/main  \
63         -I./include/CAN/TimerCtrl  \
64         -I./include/CAN/TxMsg  \
65         -I./include/main  \
66         -I./include/threads  \
67         -I./include/private
68
69 ######### add compile option #############
70 CPPFLAGS += -DLINUX -fdata-sections -ffunction-sections -DFLG_CORE
71
72 CPPFLAGS += -Werror=implicit-function-declaration
73 CPPFLAGS += -Werror=format-security 
74
75 CPPFLAGS += -Wconversion
76 CPPFLAGS += -Wint-to-pointer-cast
77 CPPFLAGS += -Wpointer-arith
78 CPPFLAGS += -Wformat
79
80 CPPFLAGS += -DIMPL_AGL_APPLICATION_CALLBACKS_PRE_BACKGROUND
81
82 ######### add library path #############
83 LDFLAGS += -Wl,--no-as-needed
84 LDFLAGS += -Wl,--no-undefined
85 LDFLAGS += -Wl,--gc-sections
86
87 ######### linked library (dynamic) #############
88 LDLIBS += -Wl,-Bdynamic -lPosixBasedOS001legacy
89 LDLIBS += -Wl,-Bdynamic -lrt
90 LDLIBS += -Wl,-Bdynamic -lstdc++
91 LDLIBS += -Wl,-Bdynamic -lSS_SystemIfUnified
92 LDLIBS += -Wl,-Bdynamic -lNS_FrameworkUnified
93 LDLIBS += -Wl,-Bdynamic -lcommon
94 LDLIBS += -Wl,-Bdynamic -lcan_hal
95
96 include ../../peripheral_service.mk