diff --git a/Makefile b/Makefile index 85059973..483b8784 100644 --- a/Makefile +++ b/Makefile @@ -4,27 +4,9 @@ SUBDIRS = lib bin .PHONY: all all: - @echo - @echo "********************************" - @echo "*** Building shared libxbps ***" - @echo "********************************" - @echo - $(MAKE) -C lib - @echo - @echo "********************************" - @echo "*** Building shared binaries ***" - @echo "********************************" - @echo - $(MAKE) -C bin - @echo - @echo "********************************" - @echo "*** Building static binaries ***" - @echo "********************************" - @echo - $(MAKE) -C lib clean - $(MAKE) -C bin clean - $(MAKE) STATIC=1 -C lib - $(MAKE) STATIC=1 -C bin + for dir in $(SUBDIRS); do \ + $(MAKE) -C $$dir; \ + done .PHONY: install install: diff --git a/lib/Makefile b/lib/Makefile index c5038555..7d670f3d 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -44,7 +44,9 @@ libxbps.a: $(OBJS) .PHONY: install install: all install -d $(LIBDIR) +ifdef STATIC install -m 644 libxbps.a $(LIBDIR) +endif install -m 644 $(LIBXBPS_SHLIB) $(LIBDIR) cp -a libxbps.so $(LIBDIR) cp -a libxbps.so.$(LIBMAJOR) $(LIBDIR) diff --git a/prog.mk b/prog.mk index 6b570d2d..3891d786 100644 --- a/prog.mk +++ b/prog.mk @@ -29,7 +29,9 @@ clean: install: $(BIN) $(MAN) install -d $(SBINDIR) install $(INSTALL_STRIPPED) -m 755 $(BIN) $(SBINDIR) +ifdef STATIC install $(INSTALL_STRIPPED) -m 755 $(BIN).static $(SBINDIR) +endif ifdef MAN install -d $(MANDIR) install -m 644 $(MAN) $(MANDIR)