浏览代码

Allow custom CFLAGS and CPPFLAGS in Makefile

This is consistent with the fact that custom LDFLAGS are already allowed, and
for once, it makes warning options easier to control.

Also use automatic variables $@ and $^ consistently.
master
Zhiming Wang 8 年前
父节点
当前提交
e758ff78e5
找不到此签名对应的密钥 GPG 密钥 ID: 5B58F95EC95965D8
共有 1 个文件被更改,包括 3 次插入5 次删除
  1. +3
    -5
      Makefile

+ 3
- 5
Makefile 查看文件

@@ -3,9 +3,7 @@ VERSION = 0.6
PREFIX = /usr/local
MANPREFIX = $(PREFIX)/man

#CPPFLAGS = -DDEBUG
#CFLAGS = -g
CFLAGS = -O3 -march=native
CFLAGS += -O3 -march=native
LDLIBS = -lcurses

DISTFILES = nnn.c config.def.h nnn.1 Makefile README.md LICENSE
@@ -21,8 +19,8 @@ $(LOCALCONFIG): config.def.h
$(SRC): $(LOCALCONFIG)

$(BIN): $(SRC)
$(CC) $(CFLAGS) -o $@ $(SRC) $(LDFLAGS) $(LDLIBS)
strip $(BIN)
$(CC) $(CFLAGS) $(CPPFLAGS) -o $@ $^ $(LDFLAGS) $(LDLIBS)
strip $@

install: all
mkdir -p $(DESTDIR)$(PREFIX)/bin


正在加载...
取消
保存