beginning of strip

This commit is contained in:
Stefano D'Angelo 2025-01-02 14:39:48 +01:00
parent 21df671d15
commit dce3373d9b
4 changed files with 27 additions and 4 deletions

View File

@ -96,6 +96,9 @@ $(DIRS):
clean:
rm -fr build
strip: all
strip build/$(PROGRAM)
ifeq ($(OS), Windows_NT)
.PHONY: all clean
else
@ -103,7 +106,7 @@ install: all
mkdir -m 0755 -p $(BINDIR)
install -m 0755 build/$(PROGRAM) $(BINDIR)
.PHONY: all clean install
.PHONY: all clean strip install
endif
-include $(MKINC_DIR)/rules-extra.mk

View File

@ -113,6 +113,13 @@ $(DIRS):
clean:
rm -fr build
strip: all
strip build/$(BUNDLE_DIR)/$(DLL_FILE)
#Reaper can't handle this
#rdfproc lv2_store parse build/$(BUNDLE_DIR)/manifest.ttl turtle || (rm lv2_store* && exit 1)
#rdfproc lv2_store serialize ntriples > build/$(BUNDLE_DIR)/manifest.ttl || (rm lv2_store* && exit 1)
#rm lv2_store*
install: all
@for d in `find build/$(BUNDLE_DIR) -type d`; do \
d=`echo $$d | sed 's:^build/::'` ; \
@ -143,7 +150,7 @@ install-user: all
-include $(MKINC_DIR)/rules-extra.mk
.PHONY: all clean install install-user
.PHONY: all clean strip install install-user
.SECONDEXPANSION:

View File

@ -144,6 +144,9 @@ $(DIRS):
clean:
rm -fr build
strip: all
strip build/$(BUNDLE_DIR)/$(DLL_FILE)
install: all
@for d in `find build/$(BUNDLE_DIR) -type d`; do \
d=`echo $$d | sed 's:^build/::'` ; \
@ -174,7 +177,7 @@ install-user: all
-include $(MKINC_DIR)/rules-extra.mk
.PHONY: all clean install install-user
.PHONY: all clean strip install install-user
.SECONDEXPANSION:

View File

@ -109,9 +109,19 @@ $(DIRS):
clean:
rm -fr build
strip:
#already stripped
#wasm-strip build/web/$(BUNDLE_NAME)/module.wasm
uglifyjs -c pure_funcs -m reserved build/web/$(BUNDLE_NAME)/module.js -o build/web/$(BUNDLE_NAME)/module.js
uglifyjs -c pure_funcs -m reserved build/web/$(BUNDLE_NAME)/processor.js -o build/web/$(BUNDLE_NAME)/processor.js
$(eval TMP := $(shell mktemp /tmp/index.XXXXXX))
html-minifier --collapse-whitespace --remove-comments --remove-redundant-attributes --remove-script-type-attributes --minify-css true --minify-js true build/web/index.html > $(TMP) || (rm $(TMP) && exit 1)
cp $(TMP) build/web/index.html || (rm $(TMP) && exit 1)
rm $(TMP)
-include $(MKINC_DIR)/rules-extra.mk
.PHONY: all clean
.PHONY: all clean strip
.SECONDEXPANSION: