Changed the name of a file and some lines
[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$(SDKTARGETSYSROOT)/usr/include/basesystem
29 CXXFLAGS += -include $(SDKTARGETSYSROOT)/usr/include/basesystem/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 LDFLAGS += -L$(SDKTARGETSYSROOT)/usr/lib/basesystem
41
42 RPATH := /usr/lib
43
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
50
51 ######### source files ##########################
52 VPATH := src/Common
53 VPATH += src/GpsCommon
54 VPATH += src/LineSensDrv
55
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
69
70 ######### make targets ##########################
71 all: $(TARGET)
72         @echo $@ done.
73
74 $(TARGET): $(OBJS)
75         $(CC) $(LDFLAGS) -Wl,-rpath=:$(RPATH) $(OBJS) $(LIBS) -o $(TARGET)
76         @echo $@ done.
77
78 ######### make cleans ###########################
79 GCNO_FILES := $(filter %.gcno,$(OBJS:%.o=%.gcno))
80
81 clean:
82         rm -f $(OBJS) $(TARGET) $(GCNO_FILES)
83         @echo $@ done.
84
85 ######### make installs #########################
86 install:
87         install -d -m 0755 $(DESTDIR)/usr/lib
88         install -m 0755 $(TARGET) $(DESTDIR)/usr/lib
89         @echo $@ done.
90
91