diff options
author | Rory Bradford <roryrjb@gmail.com> | 2020-04-18 22:19:52 +0100 |
---|---|---|
committer | Rory Bradford <roryrjb@gmail.com> | 2020-04-18 22:19:52 +0100 |
commit | 4120bca8530b87747b44efec0552b946b60d657e (patch) | |
tree | 48e8199baf2ee87d528b7154eef7f76913cf6a54 /Makefile | |
parent | 0017f896237b0a9b379ba102acfa8dafd5ea87a1 (diff) | |
download | rf-4120bca8530b87747b44efec0552b946b60d657e.tar.gz |
Add wholename option
Signed-off-by: Rory Bradford <roryrjb@gmail.com>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 52 |
1 files changed, 15 insertions, 37 deletions
diff --git a/Makefile b/Makefile index e66c045..f499b2d 100644 --- a/Makefile +++ b/Makefile @@ -1,52 +1,30 @@ .POSIX: -.SUFFIXES: .c .o BIN = rf -VERSION = 0.0.3 -OBJS = rf.o -MANPAGE = rf.1 +VERSION = 0.0.5 +OBJS = rf.o ignore.o +PREFIX = /usr/local CC = cc -DEPS = config.h -LIBS = -INC = -CFLAGS := ${CFLAGS} -CFLAGS += -std=c99 \ - -Wpedantic \ - -Wall \ - -Werror=format-security \ - -Werror=implicit-function-declaration \ - -O2 \ - -fstack-protector-strong \ - -fpie \ +CFLAGS = -std=c99 -O2 \ + -Wpedantic -Wall \ + -fstack-protector-strong -fpie \ -D_FORTIFY_SOURCE=2 \ - -D_DEFAULT_SOURCE \ -DVERSION='"$(VERSION)"' \ - -DNAME='"$(BIN)"' \ - $(INC) $(LIBS) -PREFIX ?= /usr/local + -DNAME='"$(BIN)"' build: $(BIN) $(BIN): $(OBJS) - $(CC) $(BIN).c $(CFLAGS) -o $(BIN) - -debug: $(OBJS) - $(CC) $(BIN).c $(CFLAGS) -g -o $(BIN) - -test: clean debug - valgrind --leak-check=full --show-leak-kinds=all --track-origins=yes --error-exitcode=1 ./$(BIN) ^$ - valgrind --leak-check=full --show-leak-kinds=all --track-origins=yes --error-exitcode=1 ./$(BIN) ^$$ - valgrind --leak-check=full --show-leak-kinds=all --track-origins=yes --error-exitcode=1 ./$(BIN) rf - -static: $(OBJS) - $(CC) $(BIN).c $(CFLAGS) -static -o $(BIN) - -%.o: %.c $(DEPS) - $(CC) -c -o $@ $< $(CFLAGS) + $(CC) $(CFLAGS) -o $(BIN) $(OBJS) install: build - install -Dm755 $(BIN) $(DESTDIR)$(PREFIX)/bin/ - install -Dm444 $(MANPAGE) $(DESTDIR)$(PREFIX)/man/man1/$(MANPAGE) + mkdir -p \ + $(DESTDIR)$(PREFIX)/bin \ + $(DESTDIR)$(PREFIX)/man/man1 \ + $(DESTDIR)$(PREFIX)/man/man5 + install -m755 $(BIN) $(DESTDIR)$(PREFIX)/bin/ + install -m444 rf.1 $(DESTDIR)$(PREFIX)/man/man1/ + install -m444 rfignore.5 $(DESTDIR)$(PREFIX)/man/man5/ clean: rm -vf $(BIN) *.o |