blob: 7d70bc52f718ca4baf694f4efe966855c74d794b [file] [log] [blame]
Girish Gowdraa707e7c2019-11-07 11:36:13 +05301#Copyright 2018-present Open Networking Foundation
Shad Ansari01b0e652018-04-05 21:02:53 +00002#
Girish Gowdraa707e7c2019-11-07 11:36:13 +05303#Licensed under the Apache License, Version 2.0 (the "License");
4#you may not use this file except in compliance with the License.
5#You may obtain a copy of the License at
Shad Ansari01b0e652018-04-05 21:02:53 +00006#
Girish Gowdraa707e7c2019-11-07 11:36:13 +05307#http://www.apache.org/licenses/LICENSE-2.0
Shad Ansari01b0e652018-04-05 21:02:53 +00008#
Girish Gowdraa707e7c2019-11-07 11:36:13 +05309#Unless required by applicable law or agreed to in writing, software
10#distributed under the License is distributed on an "AS IS" BASIS,
11#WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12#See the License for the specific language governing permissions and
13#limitations under the License.
Shad Ansari01b0e652018-04-05 21:02:53 +000014
15########################################################################
16##
17##
Luca Pretee75aaa52018-04-13 12:19:12 -070018## Config
Shad Ansari01b0e652018-04-05 21:02:53 +000019##
20##
Thiyagarajan Subramani89fffc02019-05-13 21:33:20 +000021TOP_DIR=`pwd`
Shad Ansari9acc9732018-10-30 18:01:44 +000022OPENOLTDEVICE ?= generic
Craig Lutgen88a22ad2018-10-04 12:30:46 -050023
Shad Ansari01b0e652018-04-05 21:02:53 +000024#
25# Three vendor proprietary source files are required to build BAL.
26# SW-BCM68620_<VER>.zip - Broadcom BAL source and Maple SDK.
27# sdk-all-<SDK_VER>.tar.gz - Broadcom Qumran SDK.
Craig Lutgenf040dba2018-09-27 11:21:43 -050028# ACCTON_BAL_<BAL_VER>-<DEV_VER>.patch - Accton/Edgecore's patch.
Thiyagarajan Subramani89fffc02019-05-13 21:33:20 +000029BAL_MAJOR_VER = 3
30BAL_MINOR_VER = 1
31BAL_REV_A_VER = 1
32BAL_REV_B_VER = 1
33BAL_API_VER = $(BAL_MAJOR_VER).$(BAL_MINOR_VER).$(BAL_REV_A_VER)
34BAL_VER = $(BAL_MAJOR_VER).$(BAL_MINOR_VER).$(BAL_REV_A_VER).$(BAL_REV_B_VER)
35SDK_VER = 6.5.13
36DEV_VER ?= 201908010203
Shad Ansari01b0e652018-04-05 21:02:53 +000037#
38# Version of Open Network Linux (ONL).
Thiyagarajan Subramani89fffc02019-05-13 21:33:20 +000039ONL_KERN_VER_MAJOR = 4.14
40
41# OpenOLT Proto version.
42# This specifies the GIT tag in https://github.com/opencord/voltha-protos
43# repo that we need to refer to, to pick the right version of
44# openolt.proto and tech_profile.proto
45OPENOLT_PROTO_VER ?= v1.0.3
46
Shad Ansari01b0e652018-04-05 21:02:53 +000047#
48# Build directory
49BUILD_DIR = build
Luca Pretee75aaa52018-04-13 12:19:12 -070050#
51# GRPC installation
52GRPC_ADDR = https://github.com/grpc/grpc
53GRPC_DST = /tmp/grpc
54GRPC_VER = v1.10.x
Shad Ansari2cddc552018-06-26 20:34:27 +000055
56USER := $(shell echo $(USER))
Luca Pretee75aaa52018-04-13 12:19:12 -070057#
Shad Ansari01b0e652018-04-05 21:02:53 +000058########################################################################
59##
60##
Luca Prete08e6f802018-04-17 11:49:45 -070061## Install prerequisites
Shad Ansari01b0e652018-04-05 21:02:53 +000062##
63##
64HOST_SYSTEM = $(shell uname | cut -f 1 -d_)
65SYSTEM ?= $(HOST_SYSTEM)
Luca Pretee75aaa52018-04-13 12:19:12 -070066
Humera Kouser5ac56612019-07-25 20:23:01 -040067VERSION ?= $(shell cat ../VERSION)
68
69#set ref and commit date only if committed
70LABEL_VCS_URL ?= $(shell git remote get-url $(shell git remote))
71LABEL_VCS_REF = $(shell git rev-parse HEAD)
72LABEL_BUILD_DATE ?= $(shell date -u "+%Y-%m-%dT%H:%M:%SZ")
73LABEL_COMMIT_DATE = $(shell git show -s --format=%cd --date=iso-strict HEAD)
74
Craig Lutgenf040dba2018-09-27 11:21:43 -050075LIBGRPC_PATH=$(shell pkg-config --libs-only-L grpc | sed s/-L// | sed s/\ //g)
76LIBPROTOBUF_PATH=$(shell PKG_CONFIG_ALLOW_SYSTEM_LIBS=true pkg-config --libs-only-L protobuf | sed s/-L// | sed s/\ //g)
77
Thiyagarajan Subramani89fffc02019-05-13 21:33:20 +000078CXX = @CXX@-4.9
Craig Lutgenf040dba2018-09-27 11:21:43 -050079CXXFLAGS += @CXXFLAGS@
80CXXFLAGS += $(shell pkg-config --cflags-only-I grpc++)
Humera Kouser5ac56612019-07-25 20:23:01 -040081CPPFLAGS += @CPPFLAGS@
Shad Ansari01b0e652018-04-05 21:02:53 +000082CPPFLAGS += `pkg-config --cflags protobuf grpc`
Humera Kouser5ac56612019-07-25 20:23:01 -040083CPPFLAGS += -DVERSION=\"$(VERSION)\" -DBAL_VER=\"$(BAL_VER)\" -DLABEL_VCS_URL=\"$(LABEL_VCS_URL)\" \
84 -DLABEL_VCS_REF=\"$(LABEL_VCS_REF)\" -DLABEL_BUILD_DATE=\"$(LABEL_BUILD_DATE)\" \
85 -DLABEL_COMMIT_DATE=\"$(LABEL_COMMIT_DATE)\"
Craig Lutgen7ebee132018-11-16 15:31:11 -060086CXXFLAGS += -std=c++11 -fpermissive -Wno-literal-suffix
Craig Lutgenf040dba2018-09-27 11:21:43 -050087LDFLAGS += @LDFLAGS@
88LDFLAGS += `pkg-config --libs protobuf grpc++ grpc` -ldl -lgpr
Shad Ansari9acc9732018-10-30 18:01:44 +000089CXXFLAGSDEVICE = -I./device -I./device/$(OPENOLTDEVICE) -I./device/generic
Craig Lutgenf040dba2018-09-27 11:21:43 -050090
Thiyagarajan Subramani89fffc02019-05-13 21:33:20 +000091export CXX CXXFLAGS OPENOLT_PROTO_VER
Luca Pretee75aaa52018-04-13 12:19:12 -070092
Luca Prete08e6f802018-04-17 11:49:45 -070093prereq:
Thiyagarajan Subramani89fffc02019-05-13 21:33:20 +000094 sudo apt-get -q -y install git pkg-config build-essential autoconf libtool libgflags-dev libgtest-dev clang libc++-dev unzip docker.io
95 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 -070096
Shad Ansari563ea822018-06-28 14:56:27 +000097 # Install GRPC, libprotobuf and protoc
Luca Pretee75aaa52018-04-13 12:19:12 -070098 rm -rf $(GRPC_DST)
99 git clone -b $(GRPC_VER) $(GRPC_ADDR) $(GRPC_DST)
100 cd $(GRPC_DST) && git submodule update --init
Shad Ansari563ea822018-06-28 14:56:27 +0000101 cd $(GRPC_DST)/third_party/protobuf && ./autogen.sh && ./configure
Luca Prete08e6f802018-04-17 11:49:45 -0700102 make -C $(GRPC_DST)/third_party/protobuf
103 sudo make -C $(GRPC_DST)/third_party/protobuf install
104 sudo ldconfig
Shad Ansari563ea822018-06-28 14:56:27 +0000105 make -C $(GRPC_DST)
106 sudo make -C $(GRPC_DST) install
107 sudo ldconfig
Shad Ansaricb004c52018-05-30 18:07:23 +0000108
Shad Ansari2cddc552018-06-26 20:34:27 +0000109docker:
110 echo $(USER)
111 sudo groupadd -f docker
112ifneq "$(USER)" ""
113 sudo usermod -aG docker $(USER)
114endif
115
Shad Ansari01b0e652018-04-05 21:02:53 +0000116########################################################################
117##
118##
Luca Pretee75aaa52018-04-13 12:19:12 -0700119## ONL
Shad Ansari01b0e652018-04-05 21:02:53 +0000120##
121##
Thiyagarajan Subramani89fffc02019-05-13 21:33:20 +0000122ONL_REPO = onl
Shad Ansari01b0e652018-04-05 21:02:53 +0000123ONL_DIR = $(BUILD_DIR)/$(ONL_REPO)
Shad Ansari01b0e652018-04-05 21:02:53 +0000124onl:
125 if [ ! -d "$(ONL_DIR)/OpenNetworkLinux" ]; then \
126 mkdir -p $(ONL_DIR); \
Thiyagarajan Subramani89fffc02019-05-13 21:33:20 +0000127 git clone https://github.com/opencomputeproject/OpenNetworkLinux.git $(ONL_DIR)/OpenNetworkLinux; \
128 cp download/Makefile.onl $(ONL_DIR)/Makefile; \
129 install -m 755 download/build-onl.sh $(ONL_DIR)/OpenNetworkLinux; \
130 make -C $(ONL_DIR) onl-$(ONL_KERN_VER_MAJOR); \
Shad Ansari01b0e652018-04-05 21:02:53 +0000131 fi;
132onl-force:
Shad Ansari9acc9732018-10-30 18:01:44 +0000133 make -C $(ONL_DIR) $(OPENOLTDEVICE)-$(ONL_KERN_VER_MAJOR)
Shad Ansari01b0e652018-04-05 21:02:53 +0000134distclean-onl:
135 sudo rm -rf $(ONL_DIR)
136
137########################################################################
138##
139##
Thiyagarajan Subramani89fffc02019-05-13 21:33:20 +0000140## Broadcom LIBRARY APIs
141##
142##
143BAL_API_DIR = $(BUILD_DIR)/bal-api-$(BAL_API_VER)
144
145bal-api-$(BAL_API_VER):
146 if [ ! -d "$(BAL_API_DIR)" ]; then \
147 mkdir -p $(BAL_API_DIR); \
148 git clone https://github.com/balapi/bal-api-$(BAL_API_VER).git $(BAL_API_DIR); \
149 fi;
150bal-api-clean:
151 rm $(BAL_API_DIR)
152
153########################################################################
154##
155##
Luca Pretee75aaa52018-04-13 12:19:12 -0700156## BAL
Shad Ansari01b0e652018-04-05 21:02:53 +0000157##
158##
Thiyagarajan Subramani89fffc02019-05-13 21:33:20 +0000159BAL_ZIP = SW-BCM68620_$(subst .,_,$(BAL_VER)).tgz
Shad Ansari01b0e652018-04-05 21:02:53 +0000160SDK_ZIP = sdk-all-$(SDK_VER).tar.gz
Craig Lutgenf040dba2018-09-27 11:21:43 -0500161ACCTON_PATCH = ACCTON_BAL_$(BAL_VER)-V$(DEV_VER).patch
Shad Ansari9acc9732018-10-30 18:01:44 +0000162BAL_DIR = $(BUILD_DIR)/$(OPENOLTDEVICE)-bal
Thiyagarajan Subramani89fffc02019-05-13 21:33:20 +0000163BCM_SDK = $(BAL_DIR)/switch_sdk/$(SDK_VER)
164BALLIBDIR = $(BAL_DIR)/build/host_reference/host_api
165BALLIBNAME = bal_host_api
166BAL_INC = -I$(BAL_DIR)/host_driver/bal/bal_include \
167 -I$(BAL_DIR)/host_driver/topology \
168 -I$(BAL_DIR)/host_driver/utils \
169 -I$(BAL_DIR)/host_driver/api \
170 -I$(BAL_DIR)/host_customized/os_abstraction \
171 -I$(BAL_DIR)/host_customized/os_abstraction/posix \
172 -I$(BAL_DIR)/host_customized/config \
173 -I$(BAL_DIR)/host_driver/api_conn_mgr \
174 -I$(BAL_DIR)/host_driver/conn_mgr \
175 -I$(BAL_DIR)/host_driver/api/host/topology \
176 -I$(BAL_DIR)/host_reference/cli \
177 -I$(BAL_DIR)/host_reference/api_cli \
178 -I$(BAL_API_DIR)/include \
179 -I$(BAL_API_DIR)/include/object_model
Shad Ansari01b0e652018-04-05 21:02:53 +0000180CXXFLAGS += $(BAL_INC) -I $(BAL_DIR)/lib/cmdline
Thiyagarajan Subramani89fffc02019-05-13 21:33:20 +0000181CXXFLAGS += -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 +0000182
Thiyagarajan Subramani89fffc02019-05-13 21:33:20 +0000183sdk: onl bal-api-$(BAL_API_VER)
Shad Ansari01b0e652018-04-05 21:02:53 +0000184ifeq ("$(wildcard $(BAL_DIR))","")
185 mkdir $(BAL_DIR)
Thiyagarajan Subramani89fffc02019-05-13 21:33:20 +0000186 tar zxvf download/$(BAL_ZIP) --strip 1 -C $(BAL_DIR)
Shad Ansari01b0e652018-04-05 21:02:53 +0000187 cp download/$(SDK_ZIP) $(BCM_SDK)
188 chmod -R 744 $(BAL_DIR)
189 cat download/$(ACCTON_PATCH) | patch -p1 -d $(BAL_DIR)
Thiyagarajan Subramani89fffc02019-05-13 21:33:20 +0000190 make -C $(BAL_DIR) BOARD=$(OPENOLTDEVICE) ONL_DIR=$(TOP_DIR)/$(ONL_DIR)/OpenNetworkLinux OPEN_SOURCE=y
191 make -C $(BAL_DIR) BOARD=$(OPENOLTDEVICE) release_board
Shad Ansari01b0e652018-04-05 21:02:53 +0000192endif
Shad Ansaricb004c52018-05-30 18:07:23 +0000193
Thiyagarajan Subramani89fffc02019-05-13 21:33:20 +0000194bal-release: sdk
195 make -C $(BAL_DIR) BOARD=$(OPENOLTDEVICE) release_board
Shad Ansaricb004c52018-05-30 18:07:23 +0000196
197bal-clean:
Thiyagarajan Subramani89fffc02019-05-13 21:33:20 +0000198 make -C $(BAL_DIR) BOARD=$(OPENOLTDEVICE) clean_all
Shad Ansari01b0e652018-04-05 21:02:53 +0000199
200########################################################################
201##
202##
Luca Pretee75aaa52018-04-13 12:19:12 -0700203## OpenOLT API
Shad Ansari01b0e652018-04-05 21:02:53 +0000204##
205##
Shad Ansari56c8ea42018-10-30 19:34:35 +0000206OPENOLT_PROTOS_DIR = ../protos
Shad Ansari19249582018-04-30 04:31:00 +0000207OPENOLT_API_LIB = $(OPENOLT_PROTOS_DIR)/libopenoltapi.a
Shad Ansari627b5782018-08-13 22:49:32 +0000208CXXFLAGS += -I$(OPENOLT_PROTOS_DIR) -I$(OPENOLT_PROTOS_DIR)/googleapis/gens
Shad Ansari19249582018-04-30 04:31:00 +0000209protos:
210 make -C $(OPENOLT_PROTOS_DIR) all
Shad Ansaricc01de12018-05-21 22:54:45 +0000211protos-clean:
Shad Ansari19249582018-04-30 04:31:00 +0000212 -make -C $(OPENOLT_PROTOS_DIR) clean
Shad Ansari01b0e652018-04-05 21:02:53 +0000213
214########################################################################
215##
216##
Shad Ansari627b5782018-08-13 22:49:32 +0000217## common
Shad Ansari7193ae22018-08-08 22:23:18 +0000218##
219##
Girish Gowdrafe649702019-10-30 12:49:58 +0530220
221# A hack to force a re-build of common/main.cc everytime.
222# This is needed to bake in the git VCS information in the openolt binary
223# at the time of building the openolt package.
224common/main.o: .FORCE
225.FORCE:
226 $(CXX) $(CXXFLAGS) $(CPPFLAGS) -I./common -c common/main.cc -o common/main.o
227
Shad Ansari627b5782018-08-13 22:49:32 +0000228common/%.o: common/%.cc
Humera Kouser5ac56612019-07-25 20:23:01 -0400229 $(CXX) $(CXXFLAGS) $(CPPFLAGS) -I./common -c $< -o $@
Shad Ansari7193ae22018-08-08 22:23:18 +0000230
231########################################################################
232##
233##
Craig Lutgen88a22ad2018-10-04 12:30:46 -0500234## device
235##
236##
Shad Ansari9acc9732018-10-30 18:01:44 +0000237device/$(OPENOLTDEVICE)/%.o: device/$(OPENOLTDEVICE)/%.cc
Craig Lutgen88a22ad2018-10-04 12:30:46 -0500238 $(CXX) $(CXXFLAGS) $(CXXFLAGSDEVICE) -c $< -o $@
239
240device/generic/%.o: device/generic/%.cc
241 $(CXX) $(CXXFLAGS) $(CXXFLAGSDEVICE) -c $< -o $@
242
243########################################################################
244##
245##
Shad Ansari627b5782018-08-13 22:49:32 +0000246## sim
Shad Ansari01b0e652018-04-05 21:02:53 +0000247##
248##
Shad Ansari627b5782018-08-13 22:49:32 +0000249SIM_SRCS = $(wildcard sim/*.cc) $(wildcard common/*.cc)
250SIM_OBJS = $(SIM_SRCS:.cc=.o)
251SIM_DEPS = $(SIM_SRCS:.cc=.d)
252sim: sim/openoltsim
253sim/openoltsim: protos $(SIM_OBJS)
254 $(CXX) -pthread -L/usr/local/lib $(SIM_OBJS) $(OPENOLT_API_LIB) /usr/local/lib/libprotobuf.a -o $@ -lgrpc++ -lgrpc -lpthread -ldl
255sim/%.o: sim/%.cc
256 $(CXX) -std=c++11 -fpermissive -Wno-literal-suffix -I./common -I$(OPENOLT_PROTOS_DIR) -I$(OPENOLT_PROTOS_DIR)/googleapis/gens -c $< -o $@
257clean-sim:
258 rm -f sim/openoltsim $(SIM_OBJS) $(SIM_DEPS)
259
260########################################################################
261##
262##
263## openolt
264##
265##
Shad Ansari9acc9732018-10-30 18:01:44 +0000266SRCS = $(wildcard src/*.cc) $(wildcard common/*.cc) $(wildcard device/$(OPENOLTDEVICE)/*.cc)
Shad Ansari01b0e652018-04-05 21:02:53 +0000267OBJS = $(SRCS:.cc=.o)
268DEPS = $(SRCS:.cc=.d)
269.DEFAULT_GOAL := all
Shad Ansari2ae27672019-05-09 00:26:34 +0000270all: $(BUILD_DIR)/openolt
Shad Ansaricb004c52018-05-30 18:07:23 +0000271$(BUILD_DIR)/openolt: sdk protos $(OBJS)
Shad Ansari06a13322018-09-29 01:55:33 +0000272 $(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 +0000273 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)/.
274 ln -sf $(TOP_DIR)/$(BAL_DIR)/build/host_reference/host_api/strip/libbal_host_api.so $(BUILD_DIR)/.
275 ln -sf $(TOP_DIR)/$(BAL_DIR)/build/host_driver/dev_mgmt_daemon/dev_mgmt_daemon $(BUILD_DIR)/.
Craig Lutgenf040dba2018-09-27 11:21:43 -0500276 ln -sf $(LIBGRPC_PATH)/libgrpc.so.6 $(BUILD_DIR)/libgrpc.so.6
277 ln -sf $(LIBGRPC_PATH)/libgrpc++.so.1 $(BUILD_DIR)/libgrpc++.so.1
Thiyagarajan Subramani89fffc02019-05-13 21:33:20 +0000278 ln -sf /usr/lib/x86_64-linux-gnu/libstdc++.so.6 $(BUILD_DIR)/libstdc++.so.6
279 strip $(BUILD_DIR)/openolt
Shad Ansari627b5782018-08-13 22:49:32 +0000280src/%.o: src/%.cc
Humera Kouser5ac56612019-07-25 20:23:01 -0400281 $(CXX) $(CXXFLAGS) $(CXXFLAGSDEVICE) $(CPPFLAGS) -I./common -c $< -o $@
Shad Ansari01b0e652018-04-05 21:02:53 +0000282
Shad Ansari6cd46a62018-05-13 23:20:51 +0000283deb:
Thiyagarajan Subramani89fffc02019-05-13 21:33:20 +0000284 cp $(BUILD_DIR)/release_$(OPENOLTDEVICE)_V$(BAL_MAJOR_VER).$(BAL_MINOR_VER).$(BAL_REV_A_VER).$(DEV_VER).tar.gz device/$(OPENOLTDEVICE)/mkdebian/debian
285 cp $(BUILD_DIR)/openolt device/$(OPENOLTDEVICE)/mkdebian/debian
286 cp $(BUILD_DIR)/libgrpc.so.6 device/$(OPENOLTDEVICE)/mkdebian/debian
287 cp $(BUILD_DIR)/libgrpc++.so.1 device/$(OPENOLTDEVICE)/mkdebian/debian
288 cp $(BUILD_DIR)/libstdc++.so.6 device/$(OPENOLTDEVICE)/mkdebian/debian
289 cp $(BUILD_DIR)/libbal_host_api.so device/$(OPENOLTDEVICE)/mkdebian/debian
290 cp -a scripts/init.d device/$(OPENOLTDEVICE)/mkdebian/debian
291 cd device/$(OPENOLTDEVICE)/mkdebian && ./build_$(OPENOLTDEVICE)_deb.sh
292 mv device/$(OPENOLTDEVICE)/*.deb $(BUILD_DIR)/openolt_$(OPENOLTDEVICE).deb
Shad Ansaricb004c52018-05-30 18:07:23 +0000293 make deb-cleanup
Shad Ansari6cd46a62018-05-13 23:20:51 +0000294
Shad Ansari01b0e652018-04-05 21:02:53 +0000295src/%.o: %.cpp
296 $(CXX) -MMD -c $< -o $@
297
Shad Ansaricb004c52018-05-30 18:07:23 +0000298deb-cleanup:
Thiyagarajan Subramani89fffc02019-05-13 21:33:20 +0000299 @rm -f device/$(OPENOLTDEVICE)/mkdebian/debian/$(OPENOLTDEVICE).debhelper.log
300 @rm -f device/$(OPENOLTDEVICE)/mkdebian/debian/$(OPENOLTDEVICE).postinst.debhelper
301 @rm -f device/$(OPENOLTDEVICE)/mkdebian/debian/$(OPENOLTDEVICE).postrm.debhelper
302 @rm -f device/$(OPENOLTDEVICE)/mkdebian/debian/$(OPENOLTDEVICE).substvars
303 @rm -rf device/$(OPENOLTDEVICE)/mkdebian/debian/$(OPENOLTDEVICE)/
304 @rm -f device/$(OPENOLTDEVICE)/mkdebian/debian/debhelper-build-stamp
305 @rm -f device/$(OPENOLTDEVICE)/mkdebian/debian/libgrpc++.so.1
306 @rm -f device/$(OPENOLTDEVICE)/mkdebian/debian/libgrpc.so.6
307 @rm -f device/$(OPENOLTDEVICE)/mkdebian/debian/libstdc++.so.6
308 @rm -f device/$(OPENOLTDEVICE)/mkdebian/debian/libbal_host_api.so
309 @rm -rf device/$(OPENOLTDEVICE)/mkdebian/debian/init.d/
310 @rm -f device/$(OPENOLTDEVICE)/mkdebian/debian/openolt
311 @rm -f device/$(OPENOLTDEVICE)/mkdebian/debian/release_$(OPENOLTDEVICE)_V$(BAL_MAJOR_VER).$(BAL_MINOR_VER).$(BAL_REV_A_VER).$(DEV_VER).tar.gz
312 @rm -rf device/$(OPENOLTDEVICE)/mkdebian/debian/tmp/
313 @rm -f device/$(OPENOLTDEVICE)/$(OPENOLTDEVICE)_$(BAL_VER)+edgecore-V$(DEV_VER)_amd64.changes
Shad Ansaricc01de12018-05-21 22:54:45 +0000314
Shad Ansaricb004c52018-05-30 18:07:23 +0000315clean: protos-clean deb-cleanup
Thiyagarajan Subramani89fffc02019-05-13 21:33:20 +0000316 @rm -f $(OBJS) $(DEPS)
317 @rm -rf $(OPENOLT_PROTOS_DIR)/googleapis
318 @rm -f $(BUILD_DIR)/libgrpc.so.6 $(BUILD_DIR)/libgrpc++.so.1
Girish Gowdraab7ea552020-01-07 13:25:15 +0530319 @rm -f $(BUILD_DIR)/libbal_host_api.so
Thiyagarajan Subramani89fffc02019-05-13 21:33:20 +0000320 @rm -f $(BUILD_DIR)/openolt
Girish Gowdraab7ea552020-01-07 13:25:15 +0530321 @rm -f $(BUILD_DIR)/dev_mgmt_daemon
322 @rm -f $(BUILD_DIR)/release_$(OPENOLTDEVICE)_V$(BAL_MAJOR_VER).$(BAL_MINOR_VER).$(BAL_REV_A_VER).$(DEV_VER).tar.gz
323 @rm -f $(BUILD_DIR)/openolt_$(OPENOLTDEVICE).deb
Shad Ansari19249582018-04-30 04:31:00 +0000324
Thiyagarajan Subramani89fffc02019-05-13 21:33:20 +0000325clean-src: protos-clean
326 @rm -f $(OBJS) $(DEPS)
327
328distclean: clean-src clean
329 @rm -rf $(BUILD_DIR)
Shad Ansaricb004c52018-05-30 18:07:23 +0000330
Girish Gowdrafe649702019-10-30 12:49:58 +0530331.PHONY: onl sdk bal protos prereq sim .FORCE