2018-03-07 19:08:45 -06:00
|
|
|
.ONESHELL:
|
|
|
|
SHELL = /bin/bash
|
|
|
|
.SHELLFLAGS += -e
|
|
|
|
|
|
|
|
MAIN_TARGET = $(LLDPD)
|
|
|
|
DERIVED_TARGETS = $(LIBLLDPCTL)
|
|
|
|
|
|
|
|
$(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% :
|
|
|
|
# Remove any stale files
|
|
|
|
rm -rf ./lldpd
|
|
|
|
|
|
|
|
# Clone lldpd repo
|
|
|
|
git clone https://github.com/vincentbernat/lldpd.git
|
|
|
|
pushd ./lldpd
|
|
|
|
|
|
|
|
# Reset HEAD to the commit of the proper tag
|
|
|
|
# NOTE: Using "git checkout <tag_name>" here detaches our HEAD,
|
|
|
|
# which stg doesn't like, so we use this method instead
|
|
|
|
git reset --hard $(LLDPD_VERSION)
|
|
|
|
|
|
|
|
# Apply patches
|
|
|
|
stg init
|
|
|
|
stg import -s ../patch/series
|
|
|
|
|
|
|
|
# Build source and Debian packages
|
2018-08-10 01:58:30 -05:00
|
|
|
env "with_netlink_receive_bufsize=1024*1024" dpkg-buildpackage -rfakeroot -b -us -uc -j$(SONIC_CONFIG_MAKE_JOBS)
|
2018-03-07 19:08:45 -06:00
|
|
|
popd
|
|
|
|
|
|
|
|
# Move the newly-built .deb packages to the destination directory
|
|
|
|
mv $* $(DERIVED_TARGETS) $(DEST)/
|
|
|
|
|
|
|
|
$(addprefix $(DEST)/, $(DERIVED_TARGETS)): $(DEST)/% : $(DEST)/$(MAIN_TARGET)
|