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:
parent
6798be2f58
commit
865b06be5d
@ -1,5 +1,9 @@
|
||||
BIN = xbps-bin
|
||||
OBJS = check.o install.o main.o remove.o show-deps.o ../xbps-repo/util.o
|
||||
|
||||
TOPDIR = ../..
|
||||
include $(TOPDIR)/vars.mk
|
||||
|
||||
BIN = xbps-bin
|
||||
OBJS = check.o install.o main.o remove.o show-deps.o ../xbps-repo/util.o
|
||||
STATIC_LIBS += -lz -lacl -lbz2 -llzmadec
|
||||
|
||||
include $(TOPDIR)/prog.mk
|
||||
|
||||
|
@ -1,4 +1,6 @@
|
||||
BIN = xbps-cmpver
|
||||
|
||||
TOPDIR = ../..
|
||||
include $(TOPDIR)/vars.mk
|
||||
|
||||
BIN = xbps-cmpver
|
||||
|
||||
include $(TOPDIR)/prog.mk
|
||||
|
@ -1,4 +1,6 @@
|
||||
TOPDIR = ../..
|
||||
include $(TOPDIR)/vars.mk
|
||||
|
||||
BIN = xbps-digest
|
||||
|
||||
TOPDIR = ../..
|
||||
include $(TOPDIR)/prog.mk
|
||||
|
@ -1,4 +1,6 @@
|
||||
TOPDIR = ../..
|
||||
include $(TOPDIR)/vars.mk
|
||||
|
||||
BIN = xbps-pkgdb
|
||||
|
||||
TOPDIR = ../..
|
||||
include $(TOPDIR)/prog.mk
|
||||
|
@ -1,5 +1,8 @@
|
||||
TOPDIR = ../..
|
||||
include $(TOPDIR)/vars.mk
|
||||
|
||||
BIN = xbps-repo
|
||||
OBJS = main.o util.o index.o
|
||||
STATIC_LIBS += -lz -lbz2 -lacl -llzmadec
|
||||
|
||||
TOPDIR = ../..
|
||||
include $(TOPDIR)/prog.mk
|
||||
|
@ -33,8 +33,12 @@ and install xbps binary packages:
|
||||
* GNU Make
|
||||
* GNU Bison
|
||||
* fakeroot
|
||||
* wget
|
||||
* libarchive (development package)
|
||||
* wget OR curl OR fetch
|
||||
* libarchive (devel package with static library.
|
||||
acl, lzma, bzip2 support)
|
||||
* libacl (devel package with static library)
|
||||
* lzma/xz (devel package with static library)
|
||||
* bzip2 (devel package with static library)
|
||||
* perl
|
||||
* sudo
|
||||
|
||||
|
15
prog.mk
15
prog.mk
@ -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)
|
||||
|
3
vars.mk
3
vars.mk
@ -13,7 +13,8 @@ ETCDIR ?= $(PREFIX)/etc
|
||||
TOPDIR ?= ..
|
||||
INSTALL_STRIPPED ?= -s
|
||||
|
||||
LDFLAGS += -L$(TOPDIR)/lib -L$(PREFIX)/lib -lxbps
|
||||
STATIC_LIBS ?= -lprop -lpthread -larchive
|
||||
LDFLAGS += -L$(TOPDIR)/lib -L$(PREFIX)/lib -lxbps
|
||||
CPPFLAGS += -I$(TOPDIR)/include -D_BSD_SOURCE -D_XOPEN_SOURCE=600
|
||||
CPPFLAGS += -D_GNU_SOURCE
|
||||
WARNFLAGS ?= -pedantic -std=c99 -Wall -Wextra -Werror -Wshadow -Wformat=2
|
||||
|
Loading…
Reference in New Issue
Block a user