nnn/Makefile
2014-10-21 16:52:40 +01:00

35 lines
702 B
Makefile

PREFIX = /usr/local
#CPPFLAGS += -DDEBUG
#CFLAGS += -g
LDLIBS = -lncursesw
OBJ = noice.o strlcpy.o
BIN = noice
all: $(BIN)
$(BIN): config.h $(OBJ)
$(CC) $(CFLAGS) -o $@ $(OBJ) $(LDLIBS)
config.h:
@echo copying config.def.h to $@
@cp config.def.h $@
noice.o: noice.c queue.h util.h
$(CC) $(CFLAGS) $(CPPFLAGS) -c noice.c
strlcpy.o: strlcpy.c util.h
$(CC) $(CFLAGS) -c strlcpy.c
install: all
@echo installing $(BIN) to $(DESTDIR)$(PREFIX)/bin
@mkdir -p $(DESTDIR)$(PREFIX)/bin
@cp -f $(BIN) $(DESTDIR)$(PREFIX)/bin
@chmod 755 $(DESTDIR)$(PREFIX)/bin/$(BIN)
uninstall:
@echo removing $(BIN) from $(DESTDIR)$(PREFIX)/bin
@rm -f $(DESTDIR)$(PREFIX)/bin/$(BIN)
clean:
rm -f $(BIN) $(OBJ)