blob: cee6f34dbf3e2461c090f0eaa38a10fdc90ee3c2 [file] [log] [blame]
Shad Ansari01b0e652018-04-05 21:02:53 +00001# Copyright (C) 2018 Open Networking Foundation
2#
3# This program is free software: you can redistribute it and/or modify
4# it under the terms of the GNU General Public License as published by
5# the Free Software Foundation, either version 3 of the License, or
6# (at your option) any later version.
7#
8# This program is distributed in the hope that it will be useful,
9# but WITHOUT ANY WARRANTY; without even the implied warranty of
10# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11# GNU General Public License for more details.
12#
13# You should have received a copy of the GNU General Public License
14# along with this program. If not, see <http://www.gnu.org/licenses/>.
15
16########################################################################
17##
18##
Luca Pretee75aaa52018-04-13 12:19:12 -070019## Config
Shad Ansari01b0e652018-04-05 21:02:53 +000020##
21##
Thiyagarajan Subramani89fffc02019-05-13 21:33:20 +000022TOP_DIR=`pwd`
Shad Ansari9acc9732018-10-30 18:01:44 +000023OPENOLTDEVICE ?= generic
Craig Lutgen88a22ad2018-10-04 12:30:46 -050024
Shad Ansari01b0e652018-04-05 21:02:53 +000025#
26# Three vendor proprietary source files are required to build BAL.
27# SW-BCM68620_<VER>.zip - Broadcom BAL source and Maple SDK.
28# sdk-all-<SDK_VER>.tar.gz - Broadcom Qumran SDK.
Craig Lutgenf040dba2018-09-27 11:21:43 -050029# ACCTON_BAL_<BAL_VER>-<DEV_VER>.patch - Accton/Edgecore's patch.
Thiyagarajan Subramani89fffc02019-05-13 21:33:20 +000030BAL_MAJOR_VER = 3
31BAL_MINOR_VER = 1
32BAL_REV_A_VER = 1
33BAL_REV_B_VER = 1
34BAL_API_VER = $(BAL_MAJOR_VER).$(BAL_MINOR_VER).$(BAL_REV_A_VER)
35BAL_VER = $(BAL_MAJOR_VER).$(BAL_MINOR_VER).$(BAL_REV_A_VER).$(BAL_REV_B_VER)
36SDK_VER = 6.5.13
37DEV_VER ?= 201908010203
Shad Ansari01b0e652018-04-05 21:02:53 +000038#
39# Version of Open Network Linux (ONL).
Thiyagarajan Subramani89fffc02019-05-13 21:33:20 +000040ONL_KERN_VER_MAJOR = 4.14
41
42# OpenOLT Proto version.
43# This specifies the GIT tag in https://github.com/opencord/voltha-protos
44# repo that we need to refer to, to pick the right version of
45# openolt.proto and tech_profile.proto
46OPENOLT_PROTO_VER ?= v1.0.3
47
Shad Ansari01b0e652018-04-05 21:02:53 +000048#
49# Build directory
50BUILD_DIR = build
Luca Pretee75aaa52018-04-13 12:19:12 -070051#
52# GRPC installation
53GRPC_ADDR = https://github.com/grpc/grpc
54GRPC_DST = /tmp/grpc
55GRPC_VER = v1.10.x
Shad Ansari2cddc552018-06-26 20:34:27 +000056
57USER := $(shell echo $(USER))
Luca Pretee75aaa52018-04-13 12:19:12 -070058#
Shad Ansari01b0e652018-04-05 21:02:53 +000059########################################################################
60##
61##
Luca Prete08e6f802018-04-17 11:49:45 -070062## Install prerequisites
Shad Ansari01b0e652018-04-05 21:02:53 +000063##
64##
65HOST_SYSTEM = $(shell uname | cut -f 1 -d_)
66SYSTEM ?= $(HOST_SYSTEM)
Luca Pretee75aaa52018-04-13 12:19:12 -070067
Humera Kouser5ac56612019-07-25 20:23:01 -040068VERSION ?= $(shell cat ../VERSION)
69
70#set ref and commit date only if committed
71LABEL_VCS_URL ?= $(shell git remote get-url $(shell git remote))
72LABEL_VCS_REF = $(shell git rev-parse HEAD)
73LABEL_BUILD_DATE ?= $(shell date -u "+%Y-%m-%dT%H:%M:%SZ")
74LABEL_COMMIT_DATE = $(shell git show -s --format=%cd --date=iso-strict HEAD)
75
Craig Lutgenf040dba2018-09-27 11:21:43 -050076LIBGRPC_PATH=$(shell pkg-config --libs-only-L grpc | sed s/-L// | sed s/\ //g)
77LIBPROTOBUF_PATH=$(shell PKG_CONFIG_ALLOW_SYSTEM_LIBS=true pkg-config --libs-only-L protobuf | sed s/-L// | sed s/\ //g)
78
Thiyagarajan Subramani89fffc02019-05-13 21:33:20 +000079CXX = @CXX@-4.9
Craig Lutgenf040dba2018-09-27 11:21:43 -050080CXXFLAGS += @CXXFLAGS@
81CXXFLAGS += $(shell pkg-config --cflags-only-I grpc++)
Humera Kouser5ac56612019-07-25 20:23:01 -040082CPPFLAGS += @CPPFLAGS@
Shad Ansari01b0e652018-04-05 21:02:53 +000083CPPFLAGS += `pkg-config --cflags protobuf grpc`
Humera Kouser5ac56612019-07-25 20:23:01 -040084CPPFLAGS += -DVERSION=\"$(VERSION)\" -DBAL_VER=\"$(BAL_VER)\" -DLABEL_VCS_URL=\"$(LABEL_VCS_URL)\" \
85 -DLABEL_VCS_REF=\"$(LABEL_VCS_REF)\" -DLABEL_BUILD_DATE=\"$(LABEL_BUILD_DATE)\" \
86 -DLABEL_COMMIT_DATE=\"$(LABEL_COMMIT_DATE)\"
Craig Lutgen7ebee132018-11-16 15:31:11 -060087CXXFLAGS += -std=c++11 -fpermissive -Wno-literal-suffix
Craig Lutgenf040dba2018-09-27 11:21:43 -050088LDFLAGS += @LDFLAGS@
89LDFLAGS += `pkg-config --libs protobuf grpc++ grpc` -ldl -lgpr
Shad Ansari9acc9732018-10-30 18:01:44 +000090CXXFLAGSDEVICE = -I./device -I./device/$(OPENOLTDEVICE) -I./device/generic
Craig Lutgenf040dba2018-09-27 11:21:43 -050091
Thiyagarajan Subramani89fffc02019-05-13 21:33:20 +000092export CXX CXXFLAGS OPENOLT_PROTO_VER
Luca Pretee75aaa52018-04-13 12:19:12 -070093
Luca Prete08e6f802018-04-17 11:49:45 -070094prereq:
Thiyagarajan Subramani89fffc02019-05-13 21:33:20 +000095 sudo apt-get -q -y install git pkg-config build-essential autoconf libtool libgflags-dev libgtest-dev clang libc++-dev unzip docker.io
96 sudo apt-get install -y build-essential autoconf libssl-dev gawk debhelper dh-systemd init-system-helpers curl cmake ccache g++-4.9
Luca Pretee75aaa52018-04-13 12:19:12 -070097
Shad Ansari563ea822018-06-28 14:56:27 +000098 # Install GRPC, libprotobuf and protoc
Luca Pretee75aaa52018-04-13 12:19:12 -070099 rm -rf $(GRPC_DST)
100 git clone -b $(GRPC_VER) $(GRPC_ADDR) $(GRPC_DST)
101 cd $(GRPC_DST) && git submodule update --init
Shad Ansari563ea822018-06-28 14:56:27 +0000102 cd $(GRPC_DST)/third_party/protobuf && ./autogen.sh && ./configure
Luca Prete08e6f802018-04-17 11:49:45 -0700103 make -C $(GRPC_DST)/third_party/protobuf
104 sudo make -C $(GRPC_DST)/third_party/protobuf install
105 sudo ldconfig
Shad Ansari563ea822018-06-28 14:56:27 +0000106 make -C $(GRPC_DST)
107 sudo make -C $(GRPC_DST) install
108 sudo ldconfig
Shad Ansaricb004c52018-05-30 18:07:23 +0000109
Shad Ansari2cddc552018-06-26 20:34:27 +0000110docker:
111 echo $(USER)
112 sudo groupadd -f docker
113ifneq "$(USER)" ""
114 sudo usermod -aG docker $(USER)
115endif
116
Shad Ansari01b0e652018-04-05 21:02:53 +0000117########################################################################
118##
119##
Luca Pretee75aaa52018-04-13 12:19:12 -0700120## ONL
Shad Ansari01b0e652018-04-05 21:02:53 +0000121##
122##
Thiyagarajan Subramani89fffc02019-05-13 21:33:20 +0000123ONL_REPO = onl
Shad Ansari01b0e652018-04-05 21:02:53 +0000124ONL_DIR = $(BUILD_DIR)/$(ONL_REPO)
Shad Ansari01b0e652018-04-05 21:02:53 +0000125onl:
126 if [ ! -d "$(ONL_DIR)/OpenNetworkLinux" ]; then \
127 mkdir -p $(ONL_DIR); \
Thiyagarajan Subramani89fffc02019-05-13 21:33:20 +0000128 git clone https://github.com/opencomputeproject/OpenNetworkLinux.git $(ONL_DIR)/OpenNetworkLinux; \
129 cp download/Makefile.onl $(ONL_DIR)/Makefile; \
130 install -m 755 download/build-onl.sh $(ONL_DIR)/OpenNetworkLinux; \
131 make -C $(ONL_DIR) onl-$(ONL_KERN_VER_MAJOR); \
Shad Ansari01b0e652018-04-05 21:02:53 +0000132 fi;
133onl-force:
Shad Ansari9acc9732018-10-30 18:01:44 +0000134 make -C $(ONL_DIR) $(OPENOLTDEVICE)-$(ONL_KERN_VER_MAJOR)
Shad Ansari01b0e652018-04-05 21:02:53 +0000135distclean-onl:
136 sudo rm -rf $(ONL_DIR)
137
138########################################################################
139##
140##
Thiyagarajan Subramani89fffc02019-05-13 21:33:20 +0000141## Broadcom LIBRARY APIs
142##
143##
144BAL_API_DIR = $(BUILD_DIR)/bal-api-$(BAL_API_VER)
145
146bal-api-$(BAL_API_VER):
147 if [ ! -d "$(BAL_API_DIR)" ]; then \
148 mkdir -p $(BAL_API_DIR); \
149 git clone https://github.com/balapi/bal-api-$(BAL_API_VER).git $(BAL_API_DIR); \
150 fi;
151bal-api-clean:
152 rm $(BAL_API_DIR)
153
154########################################################################
155##
156##
Luca Pretee75aaa52018-04-13 12:19:12 -0700157## BAL
Shad Ansari01b0e652018-04-05 21:02:53 +0000158##
159##
Thiyagarajan Subramani89fffc02019-05-13 21:33:20 +0000160BAL_ZIP = SW-BCM68620_$(subst .,_,$(BAL_VER)).tgz
Shad Ansari01b0e652018-04-05 21:02:53 +0000161SDK_ZIP = sdk-all-$(SDK_VER).tar.gz
Craig Lutgenf040dba2018-09-27 11:21:43 -0500162ACCTON_PATCH = ACCTON_BAL_$(BAL_VER)-V$(DEV_VER).patch
Shad Ansari9acc9732018-10-30 18:01:44 +0000163BAL_DIR = $(BUILD_DIR)/$(OPENOLTDEVICE)-bal
Thiyagarajan Subramani89fffc02019-05-13 21:33:20 +0000164BCM_SDK = $(BAL_DIR)/switch_sdk/$(SDK_VER)
165BALLIBDIR = $(BAL_DIR)/build/host_reference/host_api
166BALLIBNAME = bal_host_api
167BAL_INC = -I$(BAL_DIR)/host_driver/bal/bal_include \
168 -I$(BAL_DIR)/host_driver/topology \
169 -I$(BAL_DIR)/host_driver/utils \
170 -I$(BAL_DIR)/host_driver/api \
171 -I$(BAL_DIR)/host_customized/os_abstraction \
172 -I$(BAL_DIR)/host_customized/os_abstraction/posix \
173 -I$(BAL_DIR)/host_customized/config \
174 -I$(BAL_DIR)/host_driver/api_conn_mgr \
175 -I$(BAL_DIR)/host_driver/conn_mgr \
176 -I$(BAL_DIR)/host_driver/api/host/topology \
177 -I$(BAL_DIR)/host_reference/cli \
178 -I$(BAL_DIR)/host_reference/api_cli \
179 -I$(BAL_API_DIR)/include \
180 -I$(BAL_API_DIR)/include/object_model
Shad Ansari01b0e652018-04-05 21:02:53 +0000181CXXFLAGS += $(BAL_INC) -I $(BAL_DIR)/lib/cmdline
Thiyagarajan Subramani89fffc02019-05-13 21:33:20 +0000182CXXFLAGS += -DBCMOS_MSG_QUEUE_DOMAIN_SOCKET -DBCMOS_MSG_QUEUE_UDP_SOCKET -DBCMOS_MEM_CHECK -DBCMOS_SYS_UNITTEST -DENABLE_LOG -DENABLE_CLI
Shad Ansaricb004c52018-05-30 18:07:23 +0000183
Thiyagarajan Subramani89fffc02019-05-13 21:33:20 +0000184sdk: onl bal-api-$(BAL_API_VER)
Shad Ansari01b0e652018-04-05 21:02:53 +0000185ifeq ("$(wildcard $(BAL_DIR))","")
186 mkdir $(BAL_DIR)
Thiyagarajan Subramani89fffc02019-05-13 21:33:20 +0000187 tar zxvf download/$(BAL_ZIP) --strip 1 -C $(BAL_DIR)
Shad Ansari01b0e652018-04-05 21:02:53 +0000188 cp download/$(SDK_ZIP) $(BCM_SDK)
189 chmod -R 744 $(BAL_DIR)
190 cat download/$(ACCTON_PATCH) | patch -p1 -d $(BAL_DIR)
Thiyagarajan Subramani89fffc02019-05-13 21:33:20 +0000191 make -C $(BAL_DIR) BOARD=$(OPENOLTDEVICE) ONL_DIR=$(TOP_DIR)/$(ONL_DIR)/OpenNetworkLinux OPEN_SOURCE=y
192 make -C $(BAL_DIR) BOARD=$(OPENOLTDEVICE) release_board
Shad Ansari01b0e652018-04-05 21:02:53 +0000193endif
Shad Ansaricb004c52018-05-30 18:07:23 +0000194
Thiyagarajan Subramani89fffc02019-05-13 21:33:20 +0000195bal-release: sdk
196 make -C $(BAL_DIR) BOARD=$(OPENOLTDEVICE) release_board
Shad Ansaricb004c52018-05-30 18:07:23 +0000197
198bal-clean:
Thiyagarajan Subramani89fffc02019-05-13 21:33:20 +0000199 make -C $(BAL_DIR) BOARD=$(OPENOLTDEVICE) clean_all
Shad Ansari01b0e652018-04-05 21:02:53 +0000200
201########################################################################
202##
203##
Luca Pretee75aaa52018-04-13 12:19:12 -0700204## OpenOLT API
Shad Ansari01b0e652018-04-05 21:02:53 +0000205##
206##
Shad Ansari56c8ea42018-10-30 19:34:35 +0000207OPENOLT_PROTOS_DIR = ../protos
Shad Ansari19249582018-04-30 04:31:00 +0000208OPENOLT_API_LIB = $(OPENOLT_PROTOS_DIR)/libopenoltapi.a
Shad Ansari627b5782018-08-13 22:49:32 +0000209CXXFLAGS += -I$(OPENOLT_PROTOS_DIR) -I$(OPENOLT_PROTOS_DIR)/googleapis/gens
Shad Ansari19249582018-04-30 04:31:00 +0000210protos:
211 make -C $(OPENOLT_PROTOS_DIR) all
Shad Ansaricc01de12018-05-21 22:54:45 +0000212protos-clean:
Shad Ansari19249582018-04-30 04:31:00 +0000213 -make -C $(OPENOLT_PROTOS_DIR) clean
Shad Ansari01b0e652018-04-05 21:02:53 +0000214
215########################################################################
216##
217##
Shad Ansari627b5782018-08-13 22:49:32 +0000218## common
Shad Ansari7193ae22018-08-08 22:23:18 +0000219##
220##
Shad Ansari627b5782018-08-13 22:49:32 +0000221common/%.o: common/%.cc
Humera Kouser5ac56612019-07-25 20:23:01 -0400222 $(CXX) $(CXXFLAGS) $(CPPFLAGS) -I./common -c $< -o $@
Shad Ansari7193ae22018-08-08 22:23:18 +0000223
224########################################################################
225##
226##
Craig Lutgen88a22ad2018-10-04 12:30:46 -0500227## device
228##
229##
Shad Ansari9acc9732018-10-30 18:01:44 +0000230device/$(OPENOLTDEVICE)/%.o: device/$(OPENOLTDEVICE)/%.cc
Craig Lutgen88a22ad2018-10-04 12:30:46 -0500231 $(CXX) $(CXXFLAGS) $(CXXFLAGSDEVICE) -c $< -o $@
232
233device/generic/%.o: device/generic/%.cc
234 $(CXX) $(CXXFLAGS) $(CXXFLAGSDEVICE) -c $< -o $@
235
236########################################################################
237##
238##
Shad Ansari627b5782018-08-13 22:49:32 +0000239## sim
Shad Ansari01b0e652018-04-05 21:02:53 +0000240##
241##
Shad Ansari627b5782018-08-13 22:49:32 +0000242SIM_SRCS = $(wildcard sim/*.cc) $(wildcard common/*.cc)
243SIM_OBJS = $(SIM_SRCS:.cc=.o)
244SIM_DEPS = $(SIM_SRCS:.cc=.d)
245sim: sim/openoltsim
246sim/openoltsim: protos $(SIM_OBJS)
247 $(CXX) -pthread -L/usr/local/lib $(SIM_OBJS) $(OPENOLT_API_LIB) /usr/local/lib/libprotobuf.a -o $@ -lgrpc++ -lgrpc -lpthread -ldl
248sim/%.o: sim/%.cc
249 $(CXX) -std=c++11 -fpermissive -Wno-literal-suffix -I./common -I$(OPENOLT_PROTOS_DIR) -I$(OPENOLT_PROTOS_DIR)/googleapis/gens -c $< -o $@
250clean-sim:
251 rm -f sim/openoltsim $(SIM_OBJS) $(SIM_DEPS)
252
253########################################################################
254##
255##
256## openolt
257##
258##
Shad Ansari9acc9732018-10-30 18:01:44 +0000259SRCS = $(wildcard src/*.cc) $(wildcard common/*.cc) $(wildcard device/$(OPENOLTDEVICE)/*.cc)
Shad Ansari01b0e652018-04-05 21:02:53 +0000260OBJS = $(SRCS:.cc=.o)
261DEPS = $(SRCS:.cc=.d)
262.DEFAULT_GOAL := all
Shad Ansari2ae27672019-05-09 00:26:34 +0000263all: $(BUILD_DIR)/openolt
Shad Ansaricb004c52018-05-30 18:07:23 +0000264$(BUILD_DIR)/openolt: sdk protos $(OBJS)
Shad Ansari06a13322018-09-29 01:55:33 +0000265 $(CXX) $(LDFLAGS) -L$(BALLIBDIR) $(OBJS) $(OPENOLT_API_LIB) $(LIBPROTOBUF_PATH)/libprotobuf.a -o $@ -l$(BALLIBNAME) $(shell pkg-config --libs protobuf grpc++ grpc)
Thiyagarajan Subramani89fffc02019-05-13 21:33:20 +0000266 ln -sf $(TOP_DIR)/$(BAL_DIR)/build/fs/$(OPENOLTDEVICE)/release/release_$(OPENOLTDEVICE)_V$(BAL_MAJOR_VER).$(BAL_MINOR_VER).$(BAL_REV_A_VER).$(DEV_VER).tar.gz $(BUILD_DIR)/.
267 ln -sf $(TOP_DIR)/$(BAL_DIR)/build/host_reference/host_api/strip/libbal_host_api.so $(BUILD_DIR)/.
268 ln -sf $(TOP_DIR)/$(BAL_DIR)/build/host_driver/dev_mgmt_daemon/dev_mgmt_daemon $(BUILD_DIR)/.
Craig Lutgenf040dba2018-09-27 11:21:43 -0500269 ln -sf $(LIBGRPC_PATH)/libgrpc.so.6 $(BUILD_DIR)/libgrpc.so.6
270 ln -sf $(LIBGRPC_PATH)/libgrpc++.so.1 $(BUILD_DIR)/libgrpc++.so.1
Thiyagarajan Subramani89fffc02019-05-13 21:33:20 +0000271 ln -sf /usr/lib/x86_64-linux-gnu/libstdc++.so.6 $(BUILD_DIR)/libstdc++.so.6
272 strip $(BUILD_DIR)/openolt
Shad Ansari627b5782018-08-13 22:49:32 +0000273src/%.o: src/%.cc
Humera Kouser5ac56612019-07-25 20:23:01 -0400274 $(CXX) $(CXXFLAGS) $(CXXFLAGSDEVICE) $(CPPFLAGS) -I./common -c $< -o $@
Shad Ansari01b0e652018-04-05 21:02:53 +0000275
Shad Ansari6cd46a62018-05-13 23:20:51 +0000276deb:
Thiyagarajan Subramani89fffc02019-05-13 21:33:20 +0000277 cp $(BUILD_DIR)/release_$(OPENOLTDEVICE)_V$(BAL_MAJOR_VER).$(BAL_MINOR_VER).$(BAL_REV_A_VER).$(DEV_VER).tar.gz device/$(OPENOLTDEVICE)/mkdebian/debian
278 cp $(BUILD_DIR)/openolt device/$(OPENOLTDEVICE)/mkdebian/debian
279 cp $(BUILD_DIR)/libgrpc.so.6 device/$(OPENOLTDEVICE)/mkdebian/debian
280 cp $(BUILD_DIR)/libgrpc++.so.1 device/$(OPENOLTDEVICE)/mkdebian/debian
281 cp $(BUILD_DIR)/libstdc++.so.6 device/$(OPENOLTDEVICE)/mkdebian/debian
282 cp $(BUILD_DIR)/libbal_host_api.so device/$(OPENOLTDEVICE)/mkdebian/debian
283 cp -a scripts/init.d device/$(OPENOLTDEVICE)/mkdebian/debian
284 cd device/$(OPENOLTDEVICE)/mkdebian && ./build_$(OPENOLTDEVICE)_deb.sh
285 mv device/$(OPENOLTDEVICE)/*.deb $(BUILD_DIR)/openolt_$(OPENOLTDEVICE).deb
Shad Ansaricb004c52018-05-30 18:07:23 +0000286 make deb-cleanup
Shad Ansari6cd46a62018-05-13 23:20:51 +0000287
Shad Ansari01b0e652018-04-05 21:02:53 +0000288src/%.o: %.cpp
289 $(CXX) -MMD -c $< -o $@
290
Shad Ansaricb004c52018-05-30 18:07:23 +0000291deb-cleanup:
Thiyagarajan Subramani89fffc02019-05-13 21:33:20 +0000292 @rm -f device/$(OPENOLTDEVICE)/mkdebian/debian/$(OPENOLTDEVICE).debhelper.log
293 @rm -f device/$(OPENOLTDEVICE)/mkdebian/debian/$(OPENOLTDEVICE).postinst.debhelper
294 @rm -f device/$(OPENOLTDEVICE)/mkdebian/debian/$(OPENOLTDEVICE).postrm.debhelper
295 @rm -f device/$(OPENOLTDEVICE)/mkdebian/debian/$(OPENOLTDEVICE).substvars
296 @rm -rf device/$(OPENOLTDEVICE)/mkdebian/debian/$(OPENOLTDEVICE)/
297 @rm -f device/$(OPENOLTDEVICE)/mkdebian/debian/debhelper-build-stamp
298 @rm -f device/$(OPENOLTDEVICE)/mkdebian/debian/libgrpc++.so.1
299 @rm -f device/$(OPENOLTDEVICE)/mkdebian/debian/libgrpc.so.6
300 @rm -f device/$(OPENOLTDEVICE)/mkdebian/debian/libstdc++.so.6
301 @rm -f device/$(OPENOLTDEVICE)/mkdebian/debian/libbal_host_api.so
302 @rm -rf device/$(OPENOLTDEVICE)/mkdebian/debian/init.d/
303 @rm -f device/$(OPENOLTDEVICE)/mkdebian/debian/openolt
304 @rm -f device/$(OPENOLTDEVICE)/mkdebian/debian/release_$(OPENOLTDEVICE)_V$(BAL_MAJOR_VER).$(BAL_MINOR_VER).$(BAL_REV_A_VER).$(DEV_VER).tar.gz
305 @rm -rf device/$(OPENOLTDEVICE)/mkdebian/debian/tmp/
306 @rm -f device/$(OPENOLTDEVICE)/$(OPENOLTDEVICE)_$(BAL_VER)+edgecore-V$(DEV_VER)_amd64.changes
Shad Ansaricc01de12018-05-21 22:54:45 +0000307
Shad Ansaricb004c52018-05-30 18:07:23 +0000308clean: protos-clean deb-cleanup
Thiyagarajan Subramani89fffc02019-05-13 21:33:20 +0000309 @rm -f $(OBJS) $(DEPS)
310 @rm -rf $(OPENOLT_PROTOS_DIR)/googleapis
311 @rm -f $(BUILD_DIR)/libgrpc.so.6 $(BUILD_DIR)/libgrpc++.so.1
312 @rm -f $(BUILD_DIR)/libbal_api_dist.so
313 @rm -f $(BUILD_DIR)/openolt
314 @rm -f $(BUILD_DIR)/bal_core_dist
315 @rm -f $(BUILD_DIR)/release_$(OPENOLTDEVICE)_V$(BAL_MAJOR_VER).$(DEV_VER).tar.gz
316 @rm -f $(BUILD_DIR)/openolt.deb
Shad Ansari19249582018-04-30 04:31:00 +0000317
Thiyagarajan Subramani89fffc02019-05-13 21:33:20 +0000318clean-src: protos-clean
319 @rm -f $(OBJS) $(DEPS)
320
321distclean: clean-src clean
322 @rm -rf $(BUILD_DIR)
Shad Ansaricb004c52018-05-30 18:07:23 +0000323
Shad Ansari627b5782018-08-13 22:49:32 +0000324.PHONY: onl sdk bal protos prereq sim