ref: 43c844510b4fa4a83d53068bf4dc5c17773815d4
parent: 9f40dfb0326d6fc6fe8319dae26fd032afc2906d
author: Tor Andersson <tor.andersson@artifex.com>
date: Mon Feb 25 06:57:40 EST 2019
Issue #84: Separate Makefile targets. Don't automatically build static library when building the shell or the shared library.
--- a/Makefile
+++ b/Makefile
@@ -49,9 +49,10 @@
SRCS := $(wildcard js*.c utf*.c regexp.c)
HDRS := $(wildcard js*.h mujs.h utf.h regexp.h)
-default: static
-static: $(OUT)/mujs-pp $(OUT)/mujs $(OUT)/libmujs.a
-shared: static $(OUT)/libmujs.so
+default: shell
+shell: $(OUT)/mujs $(OUT)/mujs-pp
+static: $(OUT)/libmujs.a
+shared: $(OUT)/libmujs.so
astnames.h: jsparse.h
grep -E '(AST|EXP|STM)_' jsparse.h | sed 's/^[^A-Z]*\(AST_\)*/"/;s/,.*/",/' | tr A-Z a-z > $@
@@ -101,7 +102,7 @@
watch:
@ while ! inotifywait -q -e modify $(SRCS) $(HDRS) ; do time -p $(MAKE) ; done
-install-common: release $(OUT)/mujs.pc
+install-common: shell $(OUT)/mujs.pc
install -d $(DESTDIR)$(incdir)
install -d $(DESTDIR)$(libdir)
install -d $(DESTDIR)$(libdir)/pkgconfig
@@ -110,10 +111,10 @@
install -m 644 build/release/mujs.pc $(DESTDIR)$(libdir)/pkgconfig
install -m 755 build/release/mujs $(DESTDIR)$(bindir)
-install-static: install-common
+install-static: install-common static
install -m 644 build/release/libmujs.a $(DESTDIR)$(libdir)
-install-shared: install-common
+install-shared: install-common shared
install -m 755 build/release/libmujs.so $(DESTDIR)$(libdir)
install: install-static
@@ -139,8 +140,8 @@
$(MAKE) build=sanitize
release:
- $(MAKE) build=release shared
+ $(MAKE) build=release
-.PHONY: default static shared clean nuke
+.PHONY: default static shared shell clean nuke
.PHONY: install install-common install-shared install-static
.PHONY: debug sanitize release