blob: 21e596460d5612154523e097b1642a8320992d1c [file] [log] [blame]
Rajeswara Raof6b4e6c2017-08-31 17:26:27 +05301
2CC=/usr/bin/gcc
3AR=/usr/bin/ar
4
5LIB=libEdgecoreDriver.a
6
7BRDCM_SRC=/home/asfvolt/shared/OpenNetworkLinux/bal_src_release_2.4.3.6/bal_release
8GRPC_C_PATH= /home/asfvolt/shared/OpenNetworkLinux/grpc-c/
9
10GRPC_C_INC= -I$(GRPC_C_PATH)/build/ \
11 -I$(GRPC_C_PATH)/build/examples/ \
12 -I$(GRPC_C_PATH)/lib/h/
13
14INCL=*.h
15SRC=asfvolt16_driver.c \
16 bal_access_terminal_hdlr.c \
17 bal_flow_hdlr.c \
18 bal_group_hdlr.c \
19 bal_indications_hdlr.c \
20 bal_interface_hdlr.c \
21 bal_packet_hdlr.c \
22 bal_stats_hdlr.c \
23 bal_subscriber_terminal_hdlr.c \
24 bal_tmqueue_hdlr.c \
25 bal_tmsched_hdlr.c
26
Kim Kempfb032b672017-09-11 18:40:34 -070027C_OPTS=-std=c99 -Wall -Wextra -Wbad-function-cast -Wcast-align -Wcast-qual -Wchar-subscripts -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wredundant-decls -Wstrict-prototypes -Wparentheses -Wswitch -Wswitch-default -Wunused -Wuninitialized -Wunused-but-set-variable -Wno-unused-parameter -Wno-missing-field-initializers -Wshadow -MMD -MP -Wno-strict-aliasing -g -gdwarf-3 -O0 -Wall -DBCMOS_MSG_QUEUE_DOMAIN_SOCKET -DBCMOS_MSG_QUEUE_UDP_SOCKET -DBCMOS_MEM_DEBUG -DBCMOS_SYS_UNITTEST -DENABLE_LOG -DDEV_LOG_SYSLOG -DENABLE_CLI -DCONFIG_LINENOISE -DCONFIG_EDITLINE -DQAX_SWITCH -Wno-redundant-decls -DOMCI_SVC -Wno-redundant-decls -DBCM_SUBSYSTEM_CORE -DBCM_PLATFORM_MAPLE -DBCM_OS_POSIX -DBCM_SUBSYSTEM_HOST -D_KERNEL_SPACE -DBCM_EPON -DBCM_GPON -DBCM_XGPON -DCONFIG_MAC_RPC -DCONFIG_SWITCH_RPC -DSIMULATION_BUILD -DBAL_MONOLITHIC -D_XOPEN_SOURCE=600
Rajeswara Raof6b4e6c2017-08-31 17:26:27 +053028
29INC_PATH= -I. -I$(BRDCM_SRC)/src/common/os_abstraction \
30 -I$(BRDCM_SRC)/src/common/os_abstraction/posix \
31 -I$(BRDCM_SRC)/src/core/platform \
32 -I$(BRDCM_SRC)/src/common/config \
33 -I$(BRDCM_SRC)/src/common/include \
34 -I$(BRDCM_SRC)/build/core/src/common/include \
35 -I$(BRDCM_SRC)/src/common/utils \
36 -I$(BRDCM_SRC)/build/core/src/common/utils\
37 -I$(BRDCM_SRC)/3rdparty/linenoise \
38 -I$(BRDCM_SRC)/build/core/3rdparty/linenoise \
39 -I$(BRDCM_SRC)/build/core/src/common/bal_dist_utils \
40 -I$(BRDCM_SRC)/src/common/bal_dist_utils \
41 -I$(BRDCM_SRC)/src/common/cli \
42 -I$(BRDCM_SRC)/build/core/src/common/cli \
43 -I$(BRDCM_SRC)/src/common/dev_log \
44 -I$(BRDCM_SRC)/build/core/src/common/dev_log \
45 -I$(BRDCM_SRC)/src/common/os_abstraction/os_cli \
46 -I$(BRDCM_SRC)/build/core/src/common/os_abstraction/os_cli \
47 -I$(BRDCM_SRC)/3rdparty/maple/sdk/host_driver/api \
48 -I$(BRDCM_SRC)/3rdparty/maple/sdk/host_driver/host_api \
49 -I$(BRDCM_SRC)/3rdparty/maple/sdk/host_customized/embedded_cli \
50 -I$(BRDCM_SRC)/3rdparty/maple/sdk/host_customized/os_abstraction/os_cli \
51 -I$(BRDCM_SRC)/3rdparty/maple/sdk/host_driver/transport \
52 -I$(BRDCM_SRC)/3rdparty/maple/sdk/host_driver/model \
53 -I$(BRDCM_SRC)/3rdparty/maple/sdk/host_driver/common_gpon \
54 -I$(BRDCM_SRC)/3rdparty/maple/sdk/host_driver/sw_version \
55 -I$(BRDCM_SRC)/3rdparty/maple/sdk/host_reference/api_dev_log \
56 -I$(BRDCM_SRC)/3rdparty/maple/sdk/host_reference/api_cli \
57 -I$(BRDCM_SRC)/3rdparty/maple/sdk/host_reference/device_selector \
58 -I$(BRDCM_SRC)/src/lib/libobjmsg \
59 -I$(BRDCM_SRC)/build/core/src/lib/libobjmsg \
60 -I$(BRDCM_SRC)/src/lib/libbalapi \
61 -I$(BRDCM_SRC)/build/core/src/lib/libbalapi \
62 -I$(BRDCM_SRC)/src/lib/libbalapicli \
63 -I$(BRDCM_SRC)/build/core/src/lib/libbalapicli \
64 -I$(BRDCM_SRC)/src/common/bal_app_utils \
65 -I$(BRDCM_SRC)/build/core/src/common/bal_app_utils \
66 -I$(BRDCM_SRC)/src/balapiend \
67 -I$(BRDCM_SRC)/build/core/src/balapiend \
68 -I$(BRDCM_SRC)/src/common/bal_intg_app_calls \
69 -I$(BRDCM_SRC)/build/core/src/common/bal_intg_app_calls \
70 -I$(BRDCM_SRC)/src/lib/libautostart \
71 -I$(BRDCM_SRC)/build/core/src/lib/libautostart \
72 -I$(BRDCM_SRC)/src/lib/libutils \
73 -I$(BRDCM_SRC)/build/core/src/lib/libutils \
74 -I$(BRDCM_SRC)/src/lib/libtopology \
75 -I$(BRDCM_SRC)/build/core/src/lib/libtopology \
76 -I$(BRDCM_SRC)/src/core/util/mac \
77 -I$(BRDCM_SRC)/build/core/src/core/util/mac \
78 -I$(BRDCM_SRC)/3rdparty/bcm-sdk/build/sdk-all-6.5.7/include \
79 -I$(BRDCM_SRC)/3rdparty/bcm-sdk/build/sdk-all-6.5.7/libs/phymod/include \
80 -I$(BRDCM_SRC)/src/core/util/switch/dpp \
81 -I$(BRDCM_SRC)/build/core/src/core/util/switch/dpp \
82 -I$(BRDCM_SRC)/src/core/util/switch/esw \
83 -I$(BRDCM_SRC)/build/core/src/core/util/switch/esw \
84 -I$(BRDCM_SRC)/src/core/util/switch \
85 -I$(BRDCM_SRC)/build/core/src/core/util/switch \
86 -I$(BRDCM_SRC)/src/lib/librscmgr \
87 -I$(BRDCM_SRC)/build/core/src/lib/librscmgr \
88 -I$(BRDCM_SRC)/src/lib/libcmdline \
89 -I$(BRDCM_SRC)/build/core/src/lib/libcmdline \
90 -I$(BRDCM_SRC)/src/core/main \
91 -I$(BRDCM_SRC)/build/core/src/core/main \
92 -I$(BRDCM_SRC)/src/core/main \
93 -I$(BRDCM_SRC)/src/common/include \
94 -I$(BRDCM_SRC)/build/core/src/common/include \
95 -I$(BRDCM_SRC)/build/core/include \
96 $(GRPC_C_INC)
97
98VERBOSE=@
99ifeq ($V, 1)
100 VERBOSE=
101endif
102
103OBJ=$(SRC:.c=.o)
104
105%.o: %.c
106 @echo "(CC) $*.c ..."
107 $(VERBOSE) $(CC) $(C_OPTS) $(INC_PATH) -c $*.c
108
109$(LIB):$(OBJ)
110 @echo "Creating Archive $(LIB) ..."
111 $(VERBOSE) $(AR) rcs $(LIB) $(OBJ)
112
113all: $(LIB)
114
115clean:
116 rm -f *.o \
117 rm -f *.d \
118 rm -f *.a