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$(SDKTARGETSYSROOT)/usr/include/basesystem
28 CXXFLAGS += -I$(SDKTARGETSYSROOT)/usr/include/libdrm
29 CXXFLAGS += -include $(SDKTARGETSYSROOT)/usr/include/basesystem/agl_types_obsoluted.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
39 LDFLAGS += -L$(SDKTARGETSYSROOT)/usr/lib/basesystem
41 ######### linked library ########################
42 LIBS := -Wl,-Bdynamic -lstdc++
43 LIBS += -Wl,-Bdynamic -lNS_FrameworkUnified
44 LIBS += -Wl,-Bdynamic -ludev
45 LIBS += -Wl,-Bdynamic -lpthread
46 LIBS += -Wl,-Bdynamic -ldrm
48 ######### source files ##########################
51 OBJS += input_touch_ilitek.o
53 OBJS += input_udev_monitor.o
56 ######### make targets ##########################
61 $(CC) $(LDFLAGS) $(OBJS) $(LIBS) -o $(TARGET)
64 ######### make cleans ###########################
65 GCNO_FILES := $(filter %.gcno,$(OBJS:%.o=%.gcno))
68 rm -f $(OBJS) $(TARGET) $(GCNO_FILES)
71 ######### make installs #########################
72 install: install-input
74 install -d -m 0755 $(DESTDIR)/usr/lib
75 install -m 0755 $(TARGET) $(DESTDIR)/usr/lib
79 install -m 0755 -d $(DESTDIR)/usr/include/basesystem/$(COMPONENT_NAME)/
80 install -m 0644 ./hal_api/$(COMPONENT_NAME)/aglinput.h $(DESTDIR)/usr/include/basesystem/$(COMPONENT_NAME)/
81 install -m 0644 ./hal_api/$(COMPONENT_NAME)/extinput.h $(DESTDIR)/usr/include/basesystem/$(COMPONENT_NAME)/