TARGET := keepalive | |
SOURCES := keepalive.c | |
OBJECTS := $(SOURCES:.c=.o) | |
GET_LOCAL_DIR = $(patsubst %/,%,$(dir $(lastword $(MAKEFILE_LIST)))) | |
.PHONY: all clean install | |
all: $(TARGET) | |
$(TARGET): $(OBJECTS) | |
$(LINK.o) $^ $(LOADLIBES) $(LDLIBS) -o $@ | |
clean: | |
$(RM) $(OBJECTS) $(TARGET) | |
install: $(TARGET) | |
install -d $(DESTDIR)$(PREFIX)/bin/ | |
install -d $(DESTDIR)$(PREFIX)/lib/ | |
install -d $(DESTDIR)$(PREFIX)/lib/pkgconfig/ | |
install -m 755 $(TARGET) $(DESTDIR)$(PREFIX)/bin/ |