Build xbps-{bin,cmpver,digest,pkgdb,repo} as static, and install them

as foo.static.

Updated README to note the new requirements for it. It will be used
to reduce the number of dependencies when building packages in
the chroot.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20091015222234-360i67zychjge3nh
This commit is contained in:
Juan RP
2009-10-16 00:22:34 +02:00
parent 6798be2f58
commit 865b06be5d
8 changed files with 38 additions and 17 deletions

15
prog.mk
View File

@@ -1,23 +1,26 @@
include $(TOPDIR)/vars.mk
BIN_STATIC ?= $(BIN).static
OBJS ?= main.o
all: $(BIN)
all: $(BIN) $(BIN_STATIC)
.PHONY: all
$(BIN_STATIC): $(OBJS)
$(CC) -static $^ $(LDFLAGS) $(STATIC_LIBS) -o $@
$(BIN): $(OBJS)
$(CC) $(LDFLAGS) $^ -o $@
$(CC) $^ $(LDFLAGS) -o $@
.PHONY: clean
clean: clean-bins clean-objs
clean-bins:
-rm -f $(BIN)
-rm -f $(BIN) $(BIN_STATIC)
clean-objs:
-rm -f $(OBJS)
.PHONY: install
install: $(BIN)
install: $(BIN) $(BIN_STATIC)
install -d $(SBINDIR)
install $(INSTALL_STRIPPED) -m 755 $(BIN) $(SBINDIR)
install $(INSTALL_STRIPPED) -m 755 $(BIN_STATIC) $(SBINDIR)