Changed the installation path of libraries
[staging/basesystem.git] / hal / deck_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 := libdeck_hal.so
19
20 HEADER := hal_api/deck_hal.h
21
22 ######### include paths/files ###################
23 CXXFLAGS  +=  -I./inc/
24 CXXFLAGS  +=  -I./hal_api/
25 CXXFLAGS  +=  -I=/usr/include/basesystem
26 CXXFLAGS += -include agl_types_deprecated.h
27
28 ######### compile options #######################
29 CXXFLAGS +=  -Wall -fPIC
30
31 ######### link options ##########################
32 LDFLAGS += -shared
33 LDFLAGS += -Wl,--no-as-needed
34 LDFLAGS += -Wl,--no-undefined
35
36 ######### linked library ########################
37 LIBS += -Wl,-Bdynamic -lstdc++
38 LIBS += -Wl,-Bdynamic -lNS_FrameworkUnified
39
40
41 ######### source files ##########################
42 VPATH += src
43 OBJS  := deck_hal.o
44
45 ######### make targets ##########################
46 all: $(TARGET)
47         @echo $@ done.
48
49 $(TARGET): $(OBJS)
50         $(CC) $(LDFLAGS) $(OBJS) $(LIBS) -o $(TARGET)
51         @echo $@ done.
52
53 ######### make cleans ###########################
54 GCNO_FILES := $(filter %.gcno,$(OBJS:%.o=%.gcno))
55
56 clean:
57         rm -f $(OBJS) $(TARGET) $(GCNO_FILES)
58         @echo $@ done.
59
60 ######### make installs #########################
61 install:
62         install -d -m 0755 $(DESTDIR)/usr/lib
63         install -m 0755 $(TARGET) $(DESTDIR)/usr/lib
64         @echo $@ done.