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 COMPONENT_NAME := peripheral_service
19 ######### installed program/file ################
20 TARGET := libinput_hal.so
22 HEADER := ./hal_api/input_hal.h
24 ######### include paths/files ###################
26 CXXFLAGS += -I./hal_api/
27 CXXFLAGS += -I=/usr/include/basesystem
28 CXXFLAGS += -I=/usr/include/libdrm
29 CXXFLAGS += -include agl_types_deprecated.h
31 ######### compile options #######################
32 CXXFLAGS += -Wall -fPIC
33 CXXFLAGS += -D_USE_DRM
35 ######### link options ##########################
37 LDFLAGS += -Wl,--no-as-needed
38 LDFLAGS += -Wl,--no-undefined
40 ######### linked library ########################
41 LIBS := -Wl,-Bdynamic -lstdc++
42 LIBS += -Wl,-Bdynamic -lNS_FrameworkUnified
43 LIBS += -Wl,-Bdynamic -ludev
44 LIBS += -Wl,-Bdynamic -lpthread
45 LIBS += -Wl,-Bdynamic -ldrm
47 ######### source files ##########################
50 OBJS += input_touch_ilitek.o
52 OBJS += input_udev_monitor.o
55 ######### make targets ##########################
60 $(CC) $(LDFLAGS) $(OBJS) $(LIBS) -o $(TARGET)
63 ######### make cleans ###########################
64 GCNO_FILES := $(filter %.gcno,$(OBJS:%.o=%.gcno))
67 rm -f $(OBJS) $(TARGET) $(GCNO_FILES)
70 ######### make installs #########################
71 install: install-input
73 install -d -m 0755 $(DESTDIR)/usr/lib
74 install -m 0755 $(TARGET) $(DESTDIR)/usr/lib
78 install -m 0755 -d $(DESTDIR)/usr/include/basesystem/$(COMPONENT_NAME)/
79 install -m 0644 ./hal_api/$(COMPONENT_NAME)/aglinput.h $(DESTDIR)/usr/include/basesystem/$(COMPONENT_NAME)/
80 install -m 0644 ./hal_api/$(COMPONENT_NAME)/extinput.h $(DESTDIR)/usr/include/basesystem/$(COMPONENT_NAME)/