rjw | 1f88458 | 2022-01-06 17:20:42 +0800 | [diff] [blame^] | 1 | TARGET := keepalive |
| 2 | SOURCES := keepalive.c |
| 3 | OBJECTS := $(SOURCES:.c=.o) |
| 4 | |
| 5 | GET_LOCAL_DIR = $(patsubst %/,%,$(dir $(lastword $(MAKEFILE_LIST)))) |
| 6 | |
| 7 | .PHONY: all clean install |
| 8 | |
| 9 | all: $(TARGET) |
| 10 | |
| 11 | $(TARGET): $(OBJECTS) |
| 12 | $(LINK.o) $^ $(LOADLIBES) $(LDLIBS) -o $@ |
| 13 | |
| 14 | clean: |
| 15 | $(RM) $(OBJECTS) $(TARGET) |
| 16 | |
| 17 | install: $(TARGET) |
| 18 | install -d $(DESTDIR)$(PREFIX)/bin/ |
| 19 | install -d $(DESTDIR)$(PREFIX)/lib/ |
| 20 | install -d $(DESTDIR)$(PREFIX)/lib/pkgconfig/ |
| 21 | install -m 755 $(TARGET) $(DESTDIR)$(PREFIX)/bin/ |