diff options
author | Rory Bradford <roryrjb@gmail.com> | 2019-11-15 17:12:07 +0000 |
---|---|---|
committer | Rory Bradford <roryrjb@gmail.com> | 2019-11-15 17:12:07 +0000 |
commit | 0de5b3a641bc4fb405d3919f018b4869bd0612c5 (patch) | |
tree | 1b5450fb79e8a96c706bb97609555a7df5c8b967 /Makefile | |
download | rf-0de5b3a641bc4fb405d3919f018b4869bd0612c5.tar.gz |
Initial implementation
Signed-off-by: Rory Bradford <roryrjb@gmail.com>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..f92f5a3 --- /dev/null +++ b/Makefile @@ -0,0 +1,26 @@ +BIN = rf +OBJS = rf.o +MANPAGE = rf.1 +CC ?= gcc +DEPS = config.h +LIBS = +INC = +CFLAGS := ${CFLAGS} +CFLAGS += -Wall -O2 -fstack-protector-strong -D_FORTIFY_SOURCE=2 $(INC) $(LIBS) +PREFIX ?= /usr/local + +build: $(BIN) + +$(BIN): $(OBJS) + $(CC) $(BIN).c $(CFLAGS) -o $(BIN) + +%.o : %.c $(DEPS) + $(CC) -c -o $@ $< $(CFLAGS) + +install: build + install $(BIN) $(DESTDIR)$(PREFIX)/bin/ + install -TD $(MANPAGE) $(DESTDIR)$(PREFIX)/man/man1/$(MANPAGE) + gzip $(PREFIX)/man/man1/$(MANPAGE) + +clean: + rm -vf $(BIN) *.o |