Makefile (482B)
1 # See LICENSE for license details. 2 include config.mk 3 4 SRC += status.c util.c 5 OBJ = $(SRC:.c=.o) 6 7 all: status 8 9 config.h: 10 cp config.def.h config.h 11 12 .c.o: 13 $(CC) $(CFLAGS) $(CPPFLAGS) $(INCS) -o $@ -c $< 14 15 $(OBJ): config.h 16 17 status: $(OBJ) 18 $(CC) -o $@ $(OBJ) $(LIBS) $(LDFLAGS) 19 20 clean: 21 rm -f $(OBJ) status 22 23 install: all 24 mkdir -p $(DESTDIR)$(PREFIX)/bin 25 cp -f status $(DESTDIR)$(PREFIX)/bin 26 chmod 755 $(DESTDIR)$(PREFIX)/bin/status 27 28 uninstall: 29 rm -f $(DESTDIR)$(PREFIX)/bin/status