Add gitlab issue/merge request templates
[staging/basesystem.git] / hal / positioning_hal / Makefile
1 #
2 # @copyright Copyright (c) 2017-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 ######### installed program/file ################
18 TARGET := libpositioning_hal.so
19
20 HEADER := hal_api/gps_hal.h hal_api/positioning_hal.h
21
22 ######### include paths/files ###################
23 CXXFLAGS += -I.
24 CXXFLAGS += -I./inc/Common
25 CXXFLAGS += -I./inc/GpsCommon
26 CXXFLAGS += -I./inc/LineSensDrv
27 CXXFLAGS += -I./hal_api/
28 CXXFLAGS += -I=/usr/include/basesystem
29 CXXFLAGS += -include agl_types_deprecated.h
30
31
32 ######### compile options #######################
33 CXXFLAGS += -Wall -fPIC
34 CXXFLAGS += -DLINUX -D__CWORD71__VEHICLE_ -D__CWORD71_
35
36 ######### link options ##########################
37 LDFLAGS += -shared
38 LDFLAGS += -Wl,--no-as-needed
39 LDFLAGS += -Wl,--no-undefined
40
41 ######### linked library ########################
42 LIBS += -Wl,-Bdynamic -lstdc++
43 LIBS += -Wl,-Bdynamic -lNS_FrameworkUnified
44 #LIBS += -Wl,-Bdynamic -lgps_mng
45 LIBS += -Wl,-Bdynamic -lPOS_base_API
46 LIBS += -Wl,-Bdynamic -lns_backup
47
48 ######### source files ##########################
49 VPATH := src/Common
50 VPATH += src/GpsCommon
51 VPATH += src/LineSensDrv
52
53 OBJS += positioning_common.o
54 OBJS += positioning_hal.o
55 OBJS += MDev_Gps_API.o
56 OBJS += MDev_Gps_Main.o
57 OBJS += MDev_GpsRecv.o
58 OBJS += MDev_Gps_Nmea.o
59 OBJS += MDev_Gps_Common.o
60 OBJS += MDev_Gps_Mtrx.o
61 OBJS += MDev_Gps_TimerCtrl.o
62 OBJS += LineSensDrv_Sensor.o
63 OBJS += LineSensDrv_Thread.o
64 OBJS += LineSensDrv_Api.o
65 OBJS += MDev_GpsRollOver.o
66
67 ######### make targets ##########################
68 all: $(TARGET)
69         @echo $@ done.
70
71 $(TARGET): $(OBJS)
72         $(CC) $(LDFLAGS) $(OBJS) $(LIBS) -o $(TARGET)
73         @echo $@ done.
74
75 ######### make cleans ###########################
76 GCNO_FILES := $(filter %.gcno,$(OBJS:%.o=%.gcno))
77
78 clean:
79         rm -f $(OBJS) $(TARGET) $(GCNO_FILES)
80         @echo $@ done.
81
82 ######### make installs #########################
83 install:
84         install -d -m 0755 $(DESTDIR)/usr/lib
85         install -m 0755 $(TARGET) $(DESTDIR)/usr/lib
86         @echo $@ done.
87
88