9199867df1
This is a modified version of DragonFlyBSD's fastbulk utility, that has been adapted for xbps/xbps-src and contains multiple improvements like configurable logging path, skipping building non working packages (broken/only_for_archs), etc. A manual page will be pushed soon. This is still WIP, it needs more changes to support building a customizable set of packages and other additions.
60 lines
1.2 KiB
Makefile
60 lines
1.2 KiB
Makefile
-include $(TOPDIR)/config.mk
|
|
|
|
OBJS ?= main.o
|
|
|
|
BINS = $(BIN)
|
|
MANSECTION ?= 8
|
|
MAN ?= $(BIN).$(MANSECTION)
|
|
|
|
ifdef BUILD_STATIC
|
|
BINS += $(BIN).static
|
|
endif
|
|
|
|
CFLAGS+= -Wno-unused-result
|
|
|
|
.PHONY: all
|
|
all: $(BINS)
|
|
|
|
.PHONY: clean
|
|
clean:
|
|
-rm -f $(BIN) $(BIN).static
|
|
-rm -f *.o
|
|
|
|
.PHONY: install
|
|
install: all
|
|
install -d $(DESTDIR)$(SBINDIR)
|
|
install -m 755 $(BIN) $(DESTDIR)$(SBINDIR)
|
|
ifdef BUILD_STATIC
|
|
install -m 755 $(BIN).static $(DESTDIR)$(SBINDIR)
|
|
endif
|
|
ifdef MAN
|
|
install -d $(DESTDIR)$(MANDIR)/man$(MANSECTION)
|
|
install -m 644 $(MAN) $(DESTDIR)$(MANDIR)/man$(MANSECTION)
|
|
endif
|
|
|
|
.PHONY: uninstall
|
|
uninstall:
|
|
-rm -f $(DESTDIR)$(SBINDIR)/$(BIN)
|
|
ifdef BUILD_STATIC
|
|
-rm -f $(DESTDIR)$(SBINDIR)/$(BIN).static
|
|
endif
|
|
ifdef MAN
|
|
-rm -f $(DESTDIR)$(MANDIR)/man$(MANSECTION)/$(MAN)
|
|
endif
|
|
|
|
%.o: %.c
|
|
@printf " [CC]\t\t$@\n"
|
|
${SILENT}$(CC) $(CPPFLAGS) $(CFLAGS) $(EXTRA_CFLAGS) -c $<
|
|
|
|
$(BIN).static: $(OBJS)
|
|
@printf " [CCLD]\t\t$@\n"
|
|
${SILENT}$(CC) -static $^ $(CPPFLAGS) -L$(TOPDIR)/lib \
|
|
$(CFLAGS) $(LDFLAGS) $(STATIC_LIBS) -o $@
|
|
|
|
$(BIN): $(OBJS)
|
|
@printf " [CCLD]\t\t$@\n"
|
|
${SILENT}$(CC) $^ $(CPPFLAGS) -L$(TOPDIR)/lib \
|
|
$(CFLAGS) $(PROG_CFLAGS) $(LDFLAGS) $(PROG_LDFLAGS) \
|
|
-lxbps -o $@
|
|
|