Retire config.def.h, unify Makefiles

This commit is contained in:
Arun Prakash Jana 2017-07-05 08:38:34 +05:30
parent 3c612fe64d
commit 9a4c446760
No known key found for this signature in database
GPG key ID: A75979F35C080412
3 changed files with 6 additions and 14 deletions

View file

@ -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)

View 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