diff options
author | Arun Prakash Jana <engineerarun@gmail.com> | 2017-04-02 21:15:31 +0530 |
---|---|---|
committer | Arun Prakash Jana <engineerarun@gmail.com> | 2017-04-02 21:45:10 +0530 |
commit | 87e0891b8d8b9ac2779d2785ac6fd6e946fdcc5b (patch) | |
tree | 735286b4f89d0f297483d9be768e028569f194db /Makefile | |
parent | 4bc2ce0fbc27180ea5108121fec93eebf3112de1 (diff) | |
download | nnn-87e0891b8d8b9ac2779d2785ac6fd6e946fdcc5b.tar.gz |
Remove redundant stuff
1. Have a faster copy of strlcpy()
2. Remove redundant legacy files
3. Fix an issue with NULL check on array name
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 23 |
1 files changed, 11 insertions, 12 deletions
@@ -5,25 +5,24 @@ MANPREFIX = $(PREFIX)/man #CPPFLAGS = -DDEBUG #CFLAGS = -g -CFLAGS = -O3 -march=native -s +CFLAGS = -O3 -march=native LDLIBS = -lcurses -DISTFILES = nnn.c strlcat.c strlcpy.c util.h config.def.h \ - nnn.1 Makefile README.md LICENSE -OBJ = nnn.o strlcat.o strlcpy.o +DISTFILES = nnn.c config.def.h nnn.1 Makefile README.md LICENSE +LOCALCONFIG = config.h +SRC = nnn.c BIN = nnn all: $(BIN) -$(BIN): $(OBJ) - $(CC) $(CFLAGS) -o $@ $(OBJ) $(LDFLAGS) $(LDLIBS) +$(LOCALCONFIG): config.def.h + cp config.def.h $@ -nnn.o: util.h config.h -strlcat.o: util.h -strlcpy.o: util.h +$(SRC): $(LOCALCONFIG) -config.h: config.def.h - cp config.def.h $@ +$(BIN): $(SRC) + $(CC) $(CFLAGS) -o $@ $(SRC) $(LDFLAGS) $(LDLIBS) + strip $(BIN) install: all mkdir -p $(DESTDIR)$(PREFIX)/bin @@ -43,4 +42,4 @@ dist: rm -rf nnn-$(VERSION) clean: - rm -f $(BIN) $(OBJ) nnn-$(VERSION).tar.gz + rm -f $(BIN) nnn-$(VERSION).tar.gz |