Remove unused directories and files in video_in_hal
[staging/basesystem.git] / systemservice / interface_unified / library / src / makefile_PosixBasedOS001
1 #
2 # @copyright Copyright (c) 2016-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 #
18 # Standard Module Makefile version 2.0
19 #
20
21 # Name of the componet (team/domain prefix '_' component name)
22 COMPONENT_NAME = SS_PowerServiceIf
23
24 ifndef PRJ_ROOT
25 export PRJ_ROOT = $(CURDIR)/../
26 endif
27 include $(PRJ_ROOT)cfg/depends.mk
28
29 # Additive Compile Flags (Flags from initiating make process will still apply)
30 DEFS += 
31
32 # Set local includes and then the reference includes (priority order determines search path)
33 # Default pattern are any configuration includes (which would be things like PosixBasedOS001), local (Team) component directories,
34 # dependencies includes (other teams)
35 # Local (current component references should be in the form of 
36 #  $(CC_IFLAG)$(TEAM_ROOT)$(COMPONENT_NAME)/directory
37 #  Example your public include directory would be
38 #  $(CC_IFLAG)$(TEAM_ROOT)$(COMPONENT_NAME)/inc
39 # Team references should only be to other's public includes such as
40 #  $(CC_IFLAG)$(TEAM_ROOT)NS_MessageCenter/inc
41 # Global (non-team) references should be only to other's public includes such 
42 #  these are found in the depends include file and captured in the (DEPENDS_INCLUDES) variable
43 INCLUDES = \
44         $(CFG_INCS) \
45         $(CC_IFLAG)./ \
46         $(DEPENDS_INCLUDES) \
47         $(CC_IFLAG)$(TEAM_ROOT)$(COMPONENT_NAME)/inc
48
49
50 # Define binary outputs.  These can be libraries or executables.
51 #  Name a variable for each deliverable.  Suffixes should be
52 #  EXEC - For Executables -> output to the bin directory
53 #TIME_EXEC = $(BIN_PATH)time
54 #  LIB - For Static Libraries -> output to lib directory with specific naming
55 #MATH_LIB = $(LIB_PATH)$(LIB_PREFIX)math.$(LIB_EXT)
56 #  SLIB - For Shared Objects
57 #FRMWRK_SLIB = $(SLIB_PATH)frmwrk.$(SO_EXT)
58 #  LIB - Define the static library for Message Queue
59 #
60 #
61 ##COMPONENT_LIB = $(LIB_PATH)$(LIB_PREFIX)$(COMPONENT_NAME)$(DEBUG_EXT).$(LIB_EXT)
62 ifdef DYNAMIC_OFF
63         COMPONENT_LIB = $(SLIB_PATH)$(LIB_PREFIX)$(COMPONENT_NAME)$(DEBUG_EXT).$(SO_EXT)
64 else
65         COMPONENT_LIB = $(LIB_PATH)$(LIB_PREFIX)$(COMPONENT_NAME)$(DEBUG_EXT).$(LIB_EXT)
66 endif
67
68 ## Sources Section
69 # Define Library & Executable Sources (on a per deliverable basis)
70 #  This includes sources located in subdirectories.
71 # Define generic line that pulls all c, cc, cpp files 
72 # since your in the src folder is pull only files from there
73 COMPONENT_SRCS = \
74         $(wildcard *.c) \
75         $(wildcard *.cpp)
76
77 # Define sources that my not be local to your component
78 # here, you can define indivial files or wildcard from 
79 # a different folder.
80 NON_LOCAL_SRCS = \
81   
82
83 # List of all sources to be built.  Can be assembled from the other defintitions.
84 #  This only defines sources for the current directory, so if there are subdirectories
85 #  those are not included.  (Those are found in simple subdirectory makefiles that only
86 #  direct the building of sources, but no linking into a binary)
87 SOURCES = \
88         $(COMPONENT_SRCS) \
89         $(NON_LOCAL_SRCS) \
90
91
92
93 #
94 # Convert the source files to object files with correct folder location.
95 #
96 #
97 C_LANG_OBJECTS = $(addprefix $(BLD_PATH),$(addsuffix .$(OBJ_EXT),$(basename $(filter %.c ,$(SOURCES) ) ) ) )
98 CPP_LANG_OBJECTS = $(addprefix $(BLD_PATH),$(addsuffix .$(OBJ_EXT),$(basename $(filter %.cpp %.cc %.cxx,$(SOURCES) ) ) ) )
99
100
101 # List of all sources to be generated.  Can be assembled from the other defintitions.
102 OBJECTS = \
103         $(C_LANG_OBJECTS) \
104         $(CPP_LANG_OBJECTS)
105
106
107         
108 # All headers that are dependencies.  Wildcard is easy to pickup local headers.
109 #  This is only to automate the rebuilding, all builds on the servers are cleans
110 #  So this is not a huge deal when building on a component level.
111 HEADERS = \
112         $(wildcard *.h) \
113         $(wildcard $(PRJ_ROOT)../$(COMPONENT_NAME)/inc/*.h) \
114
115         
116 LIBRARIES = \
117         $(COMPONENT_LIB) \
118
119
120 # Make targets
121 #  Standard
122 all: banner module_dirs subdirs local library binary
123
124 debug: 
125         $(MAKE) TARGET=arm DEBUG=TRUE all
126
127 base: banner module_dirs subdirs local
128
129 # Standard Building of Source Files (Default builds for all objects defined above)
130 $(C_LANG_OBJECTS): $(SOURCES) $(HEADERS)
131         $(CC_CMD)
132
133 $(CPP_LANG_OBJECTS): $(SOURCES) $(HEADERS)
134         $(CPP_CMD)
135
136 local: $(OBJECTS)
137
138 # Defines specific for each deliverable
139
140 # For a static library
141 $(COMPONENT_LIB): $(OBJECTS)
142 ifdef DYNAMIC_OFF
143 # For a dynamic library
144         $(SLIB_CMD)
145 else
146 # For a static library
147         $(AR_CMD)
148 endif
149
150 # Standard set of derived targets
151 library: base \
152         $(LIBRARIES) 
153         @echo "***** `date` Done building library: $(COMPONENT_NAME) ******" 
154
155 binary: base \
156         $(BINARIES)
157
158 # Subdirs should be to jump to subdirectories
159 #  standard form is of
160 #  $(MAKE) -C subdirectory_name $(MAKECMDGOALS) 
161 subdirs:
162         
163 clean:
164         -rm -f $(BINARIES)
165         -rm -f $(LIBRARIES)
166         -rm -f $(OBJECTS)
167         -rm -f $(COMPONENT_LIB).map
168         -rm -f $(COMPONENT_LIB).debug
169
170 -v:
171         @echo "objs: --> $(OBJECTS)"
172         @echo "sources: --> $(SOURCES)"
173         @echo "headers: --> $(HEADERS)"
174         @echo "includes: --> $(INCLUDES)"
175         @echo "lib: --> $(LIBRARIES)" 
176         @echo "bin: --> $(BINARIES)"
177
178
179 module_dirs: build_dirs
180