]> Sergey Matveev's repositories - nnn.git/commitdiff
Retire config.def.h, unify Makefiles
authorArun Prakash Jana <engineerarun@gmail.com>
Wed, 5 Jul 2017 03:08:34 +0000 (08:38 +0530)
committerArun Prakash Jana <engineerarun@gmail.com>
Wed, 5 Jul 2017 03:08:34 +0000 (08:38 +0530)
Makefile
Makefile.native
config.h [moved from config.def.h with 100% similarity]

index f1aed0f90e661c45142b985345d3a3607b3b5e70..5e87f4fe3b0f281fab3a66307b6243c5202bfd07 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -13,18 +13,14 @@ else
        LDLIBS += -lncurses
 endif
 
-DISTFILES = nlay nnn.c config.def.h nnn.1 Makefile README.md LICENSE
-LOCALCONFIG = config.h
+DISTFILES = nlay nnn.c config.h nnn.1 Makefile README.md LICENSE
 SRC = nnn.c
 BIN = nnn
 PLAYER = nlay
 
 all: $(BIN) $(PLAYER)
 
-$(LOCALCONFIG): config.def.h
-       cp config.def.h $@
-
-$(SRC): $(LOCALCONFIG)
+$(SRC): config.h
 
 $(BIN): $(SRC)
        $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) $(LDLIBS)
index 8377972e383134f3f72f0481d24d6d17a118cf09..ab832de6932eb34115feaa23e92397e31eb4cf8a 100644 (file)
@@ -1,6 +1,6 @@
 VERSION = 1.2
 
-PREFIX = /usr/local
+PREFIX ?= /usr/local
 MANPREFIX = $(PREFIX)/share/man
 
 CFLAGS += -O3 -march=native -Wall -Wextra -Wno-unused-parameter
@@ -13,21 +13,17 @@ else
        LDLIBS += -lncurses
 endif
 
-DISTFILES = nlay nnn.c config.def.h nnn.1 Makefile README.md LICENSE
-LOCALCONFIG = config.h
+DISTFILES = nlay nnn.c config.h nnn.1 Makefile README.md LICENSE
 SRC = nnn.c
 BIN = nnn
 PLAYER = nlay
 
 all: $(BIN) $(PLAYER)
 
-$(LOCALCONFIG): config.def.h
-       cp config.def.h $@
-
-$(SRC): $(LOCALCONFIG)
+$(SRC): config.h
 
 $(BIN): $(SRC)
-       $(CC) $(CFLAGS) $(CPPFLAGS) -o $@ $^ $(LDFLAGS) $(LDLIBS)
+       $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) $(LDLIBS)
        strip $@
 
 install: all
similarity index 100%
rename from config.def.h
rename to config.h