Changed to not use SDKTARGETSYSROOT.
[staging/basesystem.git] / service / other / rpc_library / tool / 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 all: rpc_apidef
18
19 clean:
20         rm -rf $(CLEAN_FILES)
21
22 YACC := bison
23 YFLAGS := -d -t
24 LEX := flex
25 LFLAGS := -d
26
27 CPPFLAGS += -I../library/include
28 CPPFLAGS += -include agl_types_deprecated.h
29
30 CFLAGS += -Wall -Wno-unused-function -Wno-unused-variable
31 CFLAGS += -I../library/include
32 CFLAGS += -include agl_types_deprecated.h
33
34 rpc_apidef:     apidef.tab.o lex.yy.o apidef.o
35         $(CXX) $(CPPFLAGS) -o $@ $^
36
37 apidef.tab.o:   apidef.tab.h apidef.tab.c
38         $(CC) $(CPPFLAGS) $(CFLAGS) -c $^
39
40 lex.yy.o:       lex.yy.c
41         $(CC) $(CPPFLAGS) $(CFLAGS) -c $^
42
43 apidef.o:       apidef.cc apidef.tab.h
44         $(CXX) $(CPPFLAGS) $(CFLAGS) -c $^
45
46 apidef.tab.c:   apidef.tab.h
47
48 apidef.tab.h:   apidef.y
49         $(YACC) $(YFLAGS) $<
50
51 lex.yy.c:       apidef.l apidef.tab.h
52         $(LEX) $(LFLAGS) $<
53
54 CLEAN_FILES := rpc_apidef *.o apidef.tab.h apidef.tab.c lex.yy.c
55
56 CLEAN_TARGET := clean-all clean-all-sub clean-sub
57 INSTALL_TARGET := install-header
58 EMPTY_TARGET := install-prog install-data install-lib install-arlib install-shlib
59 .PHONY: all install clean $(CLEAN_TARGET) $(INSTALL_TARGET) $(EMPTY_TARGET)
60
61 $(CLEAN_TARGET): clean
62
63 $(INSTALL_TARGET): install
64
65 $(EMPTY_TARGET):
66
67 include ../../other_service.mk
68