xbps/prog.mk
Juan RP 95b51ae72b Fix launchpad bug #473249 "-lxbps not found because of wrong LDFLAGS"
Append (+=) to LDFLAGS as suggested in provided patch.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20091105215527-di72g9uc53tta2mu
2009-11-05 22:55:27 +01:00

46 lines
712 B
Makefile

OBJS ?= main.o
MAN ?= $(BIN).8
ifdef STATIC
all: $(BIN).static
MAN =
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: all
install -d $(SBINDIR)
ifndef STATIC
install $(INSTALL_STRIPPED) -m 755 $(BIN) $(SBINDIR)
else
install $(INSTALL_STRIPPED) -m 755 $(BIN).static $(SBINDIR)
endif
ifdef MAN
install -d $(MANDIR)
install -m 644 $(MAN) $(MANDIR)
endif
.PHONY: uninstall
uninstall:
-rm -f $(SBINDIR)/$(BIN)
-rm -f $(SBINDIR)/$(BIN).static