xbps/prog.mk
Juan RP 3905c2106c Properly build shared/static libxbps and utils.
xbps-fetch: added -v flag to see verbose messages in libfetch.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20091030111726-axf9paz2k01ntqzz
2009-10-30 12:17:26 +01:00

42 lines
690 B
Makefile

OBJS ?= main.o
MAN ?= $(BIN).8
ifdef STATIC
all: $(BIN).static
else
LDFLAGS = -lxbps
all: $(BIN) $(MAN)
endif
.PHONY: all
$(MAN):
a2x -f manpage $(MAN).txt
$(BIN).static: $(OBJS)
$(CC) $^ -static -lxbps $(LDFLAGS) -o $@
$(BIN): $(OBJS)
$(CC) $^ $(LDFLAGS) -o $@
.PHONY: clean
clean:
-rm -f $(BIN) $(MAN)
-rm -f $(BIN).static
-rm -f $(OBJS)
.PHONY: install
install: $(BIN) $(MAN)
install -d $(SBINDIR)
install $(INSTALL_STRIPPED) -m 755 $(BIN) $(SBINDIR)
install $(INSTALL_STRIPPED) -m 755 $(BIN).static $(SBINDIR)
ifdef MAN
install -d $(MANDIR)
install -m 644 $(MAN) $(MANDIR)
endif
.PHONY: uninstall
uninstall:
-rm -f $(SBINDIR)/$(BIN)
-rm -f $(SBINDIR)/$(BIN).static