modular strip (except android yet, ios, daisy-seed)
This commit is contained in:
parent
dce3373d9b
commit
7bdceca9dd
@ -78,6 +78,10 @@ DIRS := build build/obj
|
||||
|
||||
ALL := build/$(PROGRAM)
|
||||
|
||||
STRIP_ALL := build/$(PROGRAM)
|
||||
STRIP_PHONY :=
|
||||
STRIP_PREREQS := $(STRIP_ALL) $(STRIP_PHONY)
|
||||
|
||||
-include $(MKINC_DIR)/vars-extra.mk
|
||||
|
||||
all: $(ALL)
|
||||
@ -96,17 +100,17 @@ $(DIRS):
|
||||
clean:
|
||||
rm -fr build
|
||||
|
||||
strip: all
|
||||
strip: $(STRIP_PREREQS)
|
||||
strip build/$(PROGRAM)
|
||||
|
||||
ifeq ($(OS), Windows_NT)
|
||||
.PHONY: all clean
|
||||
.PHONY: all clean strip $(STRIP_PHONY)
|
||||
else
|
||||
install: all
|
||||
mkdir -m 0755 -p $(BINDIR)
|
||||
install -m 0755 build/$(PROGRAM) $(BINDIR)
|
||||
|
||||
.PHONY: all clean strip install
|
||||
.PHONY: all clean strip $(STRIP_PHONY) install
|
||||
endif
|
||||
|
||||
-include $(MKINC_DIR)/rules-extra.mk
|
||||
|
@ -92,6 +92,10 @@ DIRS := build build/$(BUNDLE_DIR) build/obj
|
||||
|
||||
ALL := build/$(BUNDLE_DIR)/manifest.ttl build/$(BUNDLE_DIR)/$(DLL_FILE)
|
||||
|
||||
STRIP_ALL := build/$(BUNDLE_DIR)/$(DLL_FILE) build/$(BUNDLE_DIR)/manifest.ttl
|
||||
STRIP_PHONY :=
|
||||
STRIP_PREREQS := $(STRIP_ALL) $(STRIP_PHONY)
|
||||
|
||||
-include $(MKINC_DIR)/vars-extra.mk
|
||||
|
||||
all: $(ALL)
|
||||
@ -113,7 +117,7 @@ $(DIRS):
|
||||
clean:
|
||||
rm -fr build
|
||||
|
||||
strip: all
|
||||
strip: $(STRIP_PREREQS)
|
||||
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)
|
||||
@ -150,7 +154,7 @@ install-user: all
|
||||
|
||||
-include $(MKINC_DIR)/rules-extra.mk
|
||||
|
||||
.PHONY: all clean strip install install-user
|
||||
.PHONY: all clean strip $(STRIP_PHONY) install install-user
|
||||
|
||||
.SECONDEXPANSION:
|
||||
|
||||
|
@ -113,11 +113,14 @@ CXX_OBJS := $(addprefix build/obj/, $(notdir $(CXX_SRCS:.cpp=.o)))
|
||||
DIRS := build build/obj build/$(BUNDLE_DIR) build/$(BUNDLE_DIR)/Contents build/$(BUNDLE_DIR)/Contents/Resources build/$(BUNDLE_DIR)/$(DLL_DIR)
|
||||
|
||||
ALL := build/$(BUNDLE_DIR)/$(DLL_FILE)
|
||||
|
||||
ifeq ($(UNAME_S), Darwin)
|
||||
ALL := $(ALL) build/$(BUNDLE_DIR)/Contents/Info.plist build/$(BUNDLE_DIR)/Contents/PkgInfo
|
||||
endif
|
||||
|
||||
STRIP_ALL := build/$(BUNDLE_DIR)/$(DLL_FILE)
|
||||
STRIP_PHONY :=
|
||||
STRIP_PREREQS := $(STRIP_ALL) $(STRIP_PHONY)
|
||||
|
||||
-include $(MKINC_DIR)/vars-extra.mk
|
||||
|
||||
all: $(ALL)
|
||||
@ -144,7 +147,7 @@ $(DIRS):
|
||||
clean:
|
||||
rm -fr build
|
||||
|
||||
strip: all
|
||||
strip: $(STRIP_PREREQS)
|
||||
strip build/$(BUNDLE_DIR)/$(DLL_FILE)
|
||||
|
||||
install: all
|
||||
@ -177,7 +180,7 @@ install-user: all
|
||||
|
||||
-include $(MKINC_DIR)/rules-extra.mk
|
||||
|
||||
.PHONY: all clean strip install install-user
|
||||
.PHONY: all clean strip $(STRIP_PHONY) install install-user
|
||||
|
||||
.SECONDEXPANSION:
|
||||
|
||||
|
@ -25,3 +25,9 @@ build/web/key.pem: build/web/cert.pem
|
||||
|
||||
build/web/cert.pem: | build
|
||||
yes "" | openssl req -x509 -newkey rsa:2048 -keyout build/web/key.pem -out build/web/cert.pem -days 365 -nodes 2>/dev/null
|
||||
|
||||
strip-web-demo: build/web/index.html
|
||||
$(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)
|
||||
|
@ -19,3 +19,7 @@
|
||||
#
|
||||
|
||||
ALL := $(ALL) build/web/index.html build/web/cert.pem build/web/key.pem
|
||||
|
||||
STRIP_ALL := $(STRIP_ALL) build/web/index.html
|
||||
STRIP_PHONY := strip-web-demo
|
||||
STRIP_PREREQS := $(STRIP_ALL) $(STRIP_PHONY)
|
||||
|
@ -85,6 +85,10 @@ DIRS := build build/obj build/web build/web/$(BUNDLE_NAME)
|
||||
|
||||
ALL := build/web/$(BUNDLE_NAME)/module.wasm build/web/$(BUNDLE_NAME)/processor.js build/web/$(BUNDLE_NAME)/module.js
|
||||
|
||||
STRIP_ALL := build/web/$(BUNDLE_NAME)/module.wasm build/web/$(BUNDLE_NAME)/processor.js build/web/$(BUNDLE_NAME)/module.js
|
||||
STRIP_PHONY :=
|
||||
STRIP_PREREQS := $(STRIP_ALL) $(STRIP_PHONY)
|
||||
|
||||
-include $(MKINC_DIR)/vars-extra.mk
|
||||
|
||||
all: $(ALL)
|
||||
@ -109,19 +113,15 @@ $(DIRS):
|
||||
clean:
|
||||
rm -fr build
|
||||
|
||||
strip:
|
||||
strip: $(STRIP_PREREQS)
|
||||
#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 strip
|
||||
.PHONY: all clean strip $(STRIP_PHONY)
|
||||
|
||||
.SECONDEXPANSION:
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user