xbps/prog.mk
Juan RP fc659323a9 prog.mk: add uninstall target.
--HG--
extra : convert_revision : xtraeme%40gmail.com-20091018153932-2igo4pum7hhjil1l
2009-10-18 17:39:32 +02:00

31 lines
582 B
Makefile

BIN_STATIC ?= $(BIN).static
OBJS ?= main.o
all: $(BIN) $(BIN_STATIC)
.PHONY: all
$(BIN_STATIC): $(OBJS)
$(CC) -static $^ $(LDFLAGS) $(STATIC_LIBS) -o $@
$(BIN): $(OBJS)
$(CC) $^ $(LDFLAGS) -o $@
.PHONY: clean
clean: clean-bins clean-objs
clean-bins:
-rm -f $(BIN) $(BIN_STATIC)
clean-objs:
-rm -f $(OBJS)
.PHONY: install
install: $(BIN) $(BIN_STATIC)
install -d $(SBINDIR)
install $(INSTALL_STRIPPED) -m 755 $(BIN) $(SBINDIR)
install $(INSTALL_STRIPPED) -m 755 $(BIN_STATIC) $(SBINDIR)
.PHONY: uninstall
uninstall:
-rm -f $(SBINDIR)/$(BIN) $(SBINDIR)/$(BIN_STATIC)