2 # @copyright Copyright (c) 2017-2020 TOYOTA MOTOR CORPORATION.
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
8 # http://www.apache.org/licenses/LICENSE-2.0
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.
17 ######### installed program/file ################
18 TARGET := libpositioning_hal.so
20 HEADER := hal_api/gps_hal.h hal_api/positioning_hal.h
22 ######### include paths/files ###################
24 CXXFLAGS += -I./inc/Common
25 CXXFLAGS += -I./inc/GpsCommon
26 CXXFLAGS += -I./inc/LineSensDrv
27 CXXFLAGS += -I./hal_api/
28 CXXFLAGS += -I$(SDKTARGETSYSROOT)/usr/include/basesystem
29 CXXFLAGS += -include $(SDKTARGETSYSROOT)/usr/include/basesystem/agl_types_deprecated.h
32 ######### compile options #######################
33 CXXFLAGS += -Wall -fPIC
34 CXXFLAGS += -DLINUX -D__CWORD71__VEHICLE_ -D__CWORD71_
36 ######### link options ##########################
38 LDFLAGS += -Wl,--no-as-needed
39 LDFLAGS += -Wl,--no-undefined
40 LDFLAGS += -L$(SDKTARGETSYSROOT)/usr/lib/basesystem
44 ######### linked library ########################
45 LIBS += -Wl,-Bdynamic -lstdc++
46 LIBS += -Wl,-Bdynamic -lNS_FrameworkUnified
47 #LIBS += -Wl,-Bdynamic -lgps_mng
48 LIBS += -Wl,-Bdynamic -lPOS_base_API
49 LIBS += -Wl,-Bdynamic -lns_backup
51 ######### source files ##########################
53 VPATH += src/GpsCommon
54 VPATH += src/LineSensDrv
56 OBJS += positioning_common.o
57 OBJS += positioning_hal.o
58 OBJS += MDev_Gps_API.o
59 OBJS += MDev_Gps_Main.o
60 OBJS += MDev_GpsRecv.o
61 OBJS += MDev_Gps_Nmea.o
62 OBJS += MDev_Gps_Common.o
63 OBJS += MDev_Gps_Mtrx.o
64 OBJS += MDev_Gps_TimerCtrl.o
65 OBJS += LineSensDrv_Sensor.o
66 OBJS += LineSensDrv_Thread.o
67 OBJS += LineSensDrv_Api.o
68 OBJS += MDev_GpsRollOver.o
70 ######### make targets ##########################
75 $(CC) $(LDFLAGS) -Wl,-rpath=:$(RPATH) $(OBJS) $(LIBS) -o $(TARGET)
78 ######### make cleans ###########################
79 GCNO_FILES := $(filter %.gcno,$(OBJS:%.o=%.gcno))
82 rm -f $(OBJS) $(TARGET) $(GCNO_FILES)
85 ######### make installs #########################
87 install -d -m 0755 $(DESTDIR)/usr/lib
88 install -m 0755 $(TARGET) $(DESTDIR)/usr/lib