Init basesystem source codes.
[staging/basesystem.git] / video_in_hal / nsframework / framework_unified / client / NS_FrameworkCore / src / statemachine / makefile
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 COMPONENT_NAME = NS_FrameworkCore
22
23 include $(PRJ_ROOT)cfg/depends.mk
24
25 # Additive Compile Flags (Flags from initiating make process will still apply)
26 DEFS +=
27
28
29 INCLUDES = \
30         $(CFG_INCS) \
31         $(CC_IFLAG). \
32         $(CC_IFLAG)../../inc \
33         $(CC_IFLAG)../../inc/statemachine \
34         $(DEPENDS_INCLUDES) \
35
36
37 ## Sources Section
38
39 SOURCES = \
40         $(wildcard *.c*)
41
42 #
43 # Convert the source files to object files with correct folder location.
44 #
45 #
46 C_LANG_OBJECTS = $(addprefix $(BLD_PATH),$(addsuffix .$(OBJ_EXT),$(basename $(filter %.c ,$(SOURCES) ) ) ) )
47 CPP_LANG_OBJECTS = $(addprefix $(BLD_PATH),$(addsuffix .$(OBJ_EXT),$(basename $(filter %.cpp %.cc %.cxx,$(SOURCES) ) ) ) )
48
49
50 # List of all sources to be generated.  Can be assembled from the other defintitions.
51 OBJECTS = \
52         $(C_LANG_OBJECTS) \
53         $(CPP_LANG_OBJECTS)
54
55
56 # All headers that are dependencies.  Wildcard is easy to pickup local headers.
57 #  This is only to automate the rebuilding, all builds on the servers are cleans
58 #  So this is not a huge deal when building on a component level.
59 HEADERS = \
60         $(wildcard *.h) \
61         $(wildcard ../../inc/*.h) \
62         $(wildcard ../../inc/NS_Statemachine/*.h) \
63         $(wildcard $(REPOSITORY_ROOT)NativeServices/inc/*.h) \
64
65 # Make targets
66 #  Standard
67 all: banner module_dirs local
68
69 base: banner module_dirs subdirs local
70
71 binary: base
72
73 local: $(OBJECTS)
74
75 # Standard set of derived targets
76 library: base \
77         $(LIBRARIES)
78         @echo "***** `date` Done building library: $(COMPONENT_NAME) ******"
79
80 # Defines specific for each deliverable
81
82
83 # Default source file build rules
84 $(OBJECTS): $(HEADERS)
85
86 # Standard Building of Source Files (Default builds for all objects defined above)
87 $(C_LANG_OBJECTS): $(SOURCES) $(HEADERS)
88         $(CC_CMD)
89
90 $(CPP_LANG_OBJECTS): $(SOURCES) $(HEADERS)
91         $(CPP_CMD)
92
93
94 clean:
95         -rm -f $(BINARIES)
96         -rm -f $(LIBRARIES)
97         -rm -f $(OBJECTS)
98
99 module_dirs: build_dirs