Modified the makefile to use xz for compression
diff --git a/Makefile b/Makefile index 0071b95..d45aeab 100644 --- a/Makefile +++ b/Makefile
@@ -1,21 +1,36 @@ -# cannot commit files larger than 100 MB to GitHub +# SPDX-FileCopyrightText: 2020 Efabless Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 + +# cannot commit files larger than 100 MB to GitHub FILE_SIZE_LIMIT_MB = 100 LARGE_FILES := $(shell find ./gds -type f -name "*.gds") LARGE_FILES += $(shell find . -type f -size +$(FILE_SIZE_LIMIT_MB)M -not -path "./.git/*" -not -path "./gds/*" -not -path "./openlane/*") -LARGE_FILES_GZ := $(addsuffix .gz, $(LARGE_FILES)) +LARGE_FILES_XZ := $(addsuffix .xz, $(LARGE_FILES)) -ARCHIVES := $(shell find . -type f -name "*.gz") +ARCHIVES := $(shell find . -type f -name "*.xz") ARCHIVE_SOURCES := $(basename $(ARCHIVES)) - # PDK setup configs THREADS ?= $(shell nproc) STD_CELL_LIBRARY ?= sky130_fd_sc_hd SPECIAL_VOLTAGE_LIBRARY ?= sky130_fd_sc_hvl IO_LIBRARY ?= sky130_fd_io SKYWATER_COMMIT ?= 3d7617a1acb92ea883539bcf22a632d6361a5de4 -OPEN_PDKS_COMMIT ?= b184e85de7629b8c87087a46b79eb45e7f7cd383 +OPEN_PDKS_COMMIT ?= 32cdb2097fd9a629c91e8ea33e1f6de08ab25946 .DEFAULT_GOAL := ship # We need portable GDS_FILE pointers... @@ -41,21 +56,21 @@ -$(LARGE_FILES_GZ): %.gz: % - @if ! [ $(suffix $<) == ".gz" ]; then\ - gzip -n --best $< > /dev/null &&\ +$(LARGE_FILES_XZ): %.xz: % + @if ! [ $(suffix $<) == ".xz" ]; then\ + xz -6 --threads=$(shell nproc) $< > /dev/null &&\ echo "$< -> $@";\ fi # This target compresses all files larger than $(FILE_SIZE_LIMIT_MB) MB .PHONY: compress -compress: $(LARGE_FILES_GZ) +compress: $(LARGE_FILES_XZ) @echo "Files larger than $(FILE_SIZE_LIMIT_MB) MBytes are compressed!" -$(ARCHIVE_SOURCES): %: %.gz - @gzip -d $< &&\ +$(ARCHIVE_SOURCES): %: %.xz + @xz --decompress $< &&\ echo "$< -> $@";\ .PHONY: uncompress @@ -84,13 +99,13 @@ mkdir -p ./spi/lvs/tmp sh ./spi/lvs/run_lvs.sh ./verilog/gl/$*.v ./spi/lvs/$*.spice $* mv -f ./spi/lvs/*{.out,.json,.log} ./spi/lvs/tmp 2> /dev/null || true - + .PHONY: help help: @$(MAKE) -pRrq -f $(lastword $(MAKEFILE_LIST)) : 2>/dev/null | awk -v RS= -F: '/^# File/,/^# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}' | sort | egrep -v -e '^[^[:alnum:]]' -e '^$@$$' - + ########################################################################### .PHONY: pdk pdk: skywater-pdk skywater-library open_pdks build-pdk @@ -101,6 +116,7 @@ .PHONY: skywater-pdk skywater-pdk: check-env $(PDK_ROOT)/skywater-pdk cd $(PDK_ROOT)/skywater-pdk && \ + git checkout master && git pull && \ git checkout -qf $(SKYWATER_COMMIT) .PHONY: skywater-library @@ -118,6 +134,7 @@ .PHONY: open_pdks open_pdks: check-env $(PDK_ROOT)/open_pdks cd $(PDK_ROOT)/open_pdks && \ + git checkout master && git pull && \ git checkout -qf $(OPEN_PDKS_COMMIT) .PHONY: build-pdk @@ -134,6 +151,16 @@ $(MAKE) && \ $(MAKE) install-local +.RECIPE: manifest +manifest: + cd verilog/rtl/ && \ + find * -type f ! -name "user_*.v" ! -name "manifest" ! -name "README" ! -name "defines.v" -exec shasum {} \; > manifest && \ + cd ../../maglef/ && \ + shasum *.mag > manifest && \ + cd ../mag/ && \ + shasum caravel.mag .magicrc > manifest + + check-env: ifndef PDK_ROOT $(error PDK_ROOT is undefined, please export it before running make)