blob: 2708c69a4fb40cb1ff9f2dd3f470bd80b09b409c [file] [log] [blame]
suhasgrao76e8f8c2017-07-12 16:24:33 +05301bin_PROGRAMS = bal_server
2
3.PHONY =
4
5HOSTPROG=yes
6
7DEFS += -DBAL_STUB
8
9bal_server_SOURCES = \
10 bal_server.c \
11 bal_stub.c \
12 grpc-c.h \
13 bal_errno.grpc-c.h bal_indications.grpc-c.h bal_model_types.grpc-c.h \
14 bal_obj.grpc-c.h bal.grpc-c.h bal_model_ids.grpc-c.h \
15 bal_msg_type.grpc-c.h bal_osmsg.grpc-c.h asfvolt16_driver.h \
16 bal.grpc-c.service.c \
17 bal_errno.grpc-c.c bal_indications.grpc-c.c \
18 bal_model_types.grpc-c.c bal_obj.grpc-c.c \
19 bal_errno.grpc-c.service.c bal_indications.grpc-c.service.c \
20 bal_model_types.grpc-c.service.c bal_obj.grpc-c.service.c \
21 bal.grpc-c.c bal_model_ids.grpc-c.c \
22 bal_msg_type.grpc-c.c bal_osmsg.grpc-c.c \
23 bal_model_ids.grpc-c.service.c \
24 bal_msg_type.grpc-c.service.c bal_osmsg.grpc-c.service.c
25
26replace:
27$(shell find . -type f \( -name '*.h' -o -name '*.c' \) -a -exec sed -i -e 's/bal_obj.proto.h/bal_obj.grpc-c.h/g' {} + )
28$(shell find . -type f \( -name '*.h' -o -name '*.c' \) -a -exec sed -i -e 's/bal_model_types.proto.h/bal_model_types.grpc-c.h/g' {} + )
29$(shell find . -type f \( -name '*.h' -o -name '*.c' \) -a -exec sed -i -e 's/bal_errno.proto.h/bal_errno.grpc-c.h/g' {} + )
30$(shell find . -type f \( -name '*.h' -o -name '*.c' \) -a -exec sed -i -e 's/bal_msg_type.proto.h/bal_msg_type.grpc-c.h/g' {} + )
31$(shell find . -type f \( -name '*.h' -o -name '*.c' \) -a -exec sed -i -e 's/bal_osmsg.proto.h/bal_osmsg.grpc-c.h/g' {} + )
32$(shell find . -type f \( -name '*.h' -o -name '*.c' \) -a -exec sed -i -e 's/bal_model_ids.proto.h/bal_model_ids.grpc-c.h/g' {} + )
33$(shell find . -type f \( -name '*.h' -o -name '*.c' \) -a -exec sed -i -e 's/bal.proto.h/bal.grpc-c.h/g' {} + )
34
35autoGenrate:
36 protoc -I ${srcdir} --grpc-c_out=. --plugin=protoc-gen-grpc-c=../compiler/protoc-gen-grpc-c ${srcdir}/bal_errno.proto ${srcdir}/bal_model_ids.proto ${srcdir}/bal_msg_type.proto ${srcdir}/bal_osmsg.proto ${srcdir}/bal_indications.proto ${srcdir}/bal_model_types.proto ${srcdir}/bal_obj.proto ${srcdir}/bal.proto $(replace)
37
38LDADD = \
39 ../lib/libgrpc-c.la \
40 /usr/local/lib/libgrpc.a \
41 /usr/local/lib/libgpr.a \
42 /usr/local/lib/libprotobuf-c.a \
43 -lssl \
44 -lcrypto \
45 -lz \
46 -lpthread
47
48EXTRA_bal_server_DEPENDENCIES=
49
50LIBS = -lrt -lm
51
52AM_CFLAGS = \
53 -I. \
54 -I${srcdir}/../lib/h/ \
55 -I${srcdir}/../third_party/protobuf-c \
56 -I${srcdir}/../third_party/grpc/include
57
58clean_all: clean
59
60all:bal_server$(EXEEXT)