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 := libvehicle_hal.so
20 HEADER := hal_api/vehicle_hal.h
22 ######### include paths/files ###################
24 CXXFLAGS += -I./hal_api/
25 CXXFLAGS += -I$(SDKTARGETSYSROOT)/usr/include/basesystem
26 CXXFLAGS += -include $(SDKTARGETSYSROOT)/usr/include/basesystem/agl_types_obsoluted.h
28 ######### compile options #######################
29 CXXFLAGS += -Wall -fPIC
31 ######### link options ##########################
33 LDFLAGS += -Wl,--no-as-needed
34 LDFLAGS += -Wl,--no-undefined
35 LDFLAGS += -L$(SDKTARGETSYSROOT)/usr/lib/basesystem
39 ######### linked library ########################
40 LIBS += -Wl,-Bdynamic -lstdc++
41 LIBS += -Wl,-Bdynamic -lpthread
42 LIBS += -Wl,-Bdynamic -lNS_FrameworkUnified
43 #LIBS += -Wl,-Bdynamic -lcarsignal_mng
45 ######### source files ##########################
49 ######### make targets ##########################
54 $(CC) $(LDFLAGS) -Wl,-rpath=:$(RPATH) $(OBJS) $(LIBS) -o $(TARGET)
57 ######### make cleans ###########################
58 GCNO_FILES := $(filter %.gcno,$(OBJS:%.o=%.gcno))
61 rm -f $(OBJS) $(TARGET) $(GCNO_FILES)
64 ######### make installs #########################
66 install -d -m 0755 $(DESTDIR)/usr/lib
67 install -m 0755 $(TARGET) $(DESTDIR)/usr/lib