Fix up some issues for building shared/static bins.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20091030162345-2so2ejfvvqr29s7v
This commit is contained in:
Juan RP 2009-10-30 17:23:45 +01:00
parent 4e83deb0cc
commit 5b6724b550
3 changed files with 7 additions and 21 deletions

View File

@ -4,27 +4,9 @@ SUBDIRS = lib bin
.PHONY: all .PHONY: all
all: all:
@echo for dir in $(SUBDIRS); do \
@echo "********************************" $(MAKE) -C $$dir; \
@echo "*** Building shared libxbps ***" done
@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
.PHONY: install .PHONY: install
install: install:

View File

@ -44,7 +44,9 @@ libxbps.a: $(OBJS)
.PHONY: install .PHONY: install
install: all install: all
install -d $(LIBDIR) install -d $(LIBDIR)
ifdef STATIC
install -m 644 libxbps.a $(LIBDIR) install -m 644 libxbps.a $(LIBDIR)
endif
install -m 644 $(LIBXBPS_SHLIB) $(LIBDIR) install -m 644 $(LIBXBPS_SHLIB) $(LIBDIR)
cp -a libxbps.so $(LIBDIR) cp -a libxbps.so $(LIBDIR)
cp -a libxbps.so.$(LIBMAJOR) $(LIBDIR) cp -a libxbps.so.$(LIBMAJOR) $(LIBDIR)

View File

@ -29,7 +29,9 @@ clean:
install: $(BIN) $(MAN) install: $(BIN) $(MAN)
install -d $(SBINDIR) install -d $(SBINDIR)
install $(INSTALL_STRIPPED) -m 755 $(BIN) $(SBINDIR) install $(INSTALL_STRIPPED) -m 755 $(BIN) $(SBINDIR)
ifdef STATIC
install $(INSTALL_STRIPPED) -m 755 $(BIN).static $(SBINDIR) install $(INSTALL_STRIPPED) -m 755 $(BIN).static $(SBINDIR)
endif
ifdef MAN ifdef MAN
install -d $(MANDIR) install -d $(MANDIR)
install -m 644 $(MAN) $(MANDIR) install -m 644 $(MAN) $(MANDIR)