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
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:

View File

@ -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)

View File

@ -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)