Skip to content

Commit

Permalink
pkg/c25519: unify Makefile variables
Browse files Browse the repository at this point in the history
  • Loading branch information
mguetschow committed Sep 29, 2023
1 parent 7f137af commit 8404ad5
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions pkg/c25519/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ PKG_SHA512 = dbfb4285837ab2ea3d99c448b22877cc7a139ccbaebb1de367e2bec1fd562fe629

PKG_SOURCE_DIR ?= $(PKGDIRBASE)/$(PKG_NAME)
PKG_ZIPFILE = $(PKGDIRBASE)/$(PKG_NAME)-$(PKG_VERSION).$(PKG_EXT)
PKG_ZIP_URL = $(PKG_URL)/$(PKG_NAME)-$(PKG_VERSION).$(PKG_EXT)

ifneq ($(RIOTBASE),)
include $(RIOTBASE)/Makefile.base
Expand All @@ -19,17 +20,17 @@ prepare: $(PKG_SOURCE_DIR)/
all: $(PKG_SOURCE_DIR)/
$(QQ)"$(MAKE)" -C $(PKG_SOURCE_DIR)/src -f $(RIOTBASE)/Makefile.base MODULE=$(PKG_NAME)

$(PKG_SOURCE_DIR)/: $(PKGDIRBASE)/$(PKG_NAME)-$(PKG_VERSION).$(PKG_EXT)
$(QQ)test "$(PKG_SHA512) $(PKG_ZIPFILE)" = "$$(sha512sum "${PKG_ZIPFILE}")"
$(PKG_SOURCE_DIR)/: $(PKG_ZIPFILE)
$(QQ)test "$(PKG_SHA512) $(PKG_ZIPFILE)" = "$$(sha512sum "$(PKG_ZIPFILE)")"
$(Q)$(UNZIP_HERE) -D -d $(PKGDIRBASE) $<

$(PKG_ZIPFILE):
$(QQ)mkdir -p $(PKGDIRBASE)
$(Q)$(DOWNLOAD_TO_FILE) $@ $(PKG_URL)/$(PKG_NAME)-$(PKG_VERSION).$(PKG_EXT)
$(Q)$(DOWNLOAD_TO_FILE) $@ $(PKG_ZIP_URL)

clean::
# Reset package to checkout state.
rm -rf $(PKG_SOURCE_DIR)

distclean::
rm -rf $(PKG_SOURCE_DIR) $(PKGDIRBASE)/$(PKG_NAME)-$(PKG_VERSION).$(PKG_EXT)
rm -rf $(PKG_SOURCE_DIR) $(PKG_ZIPFILE)

0 comments on commit 8404ad5

Please sign in to comment.