Delete config.def.h and edit Makefile
This commit is contained in:
parent
0c9ebad916
commit
ee9523989e
4 changed files with 9 additions and 11 deletions
11
Makefile
11
Makefile
|
@ -9,8 +9,6 @@ SRC = ccc.c util.c file.c
|
||||||
LDFLAGS = $(shell pkg-config --libs ncurses)
|
LDFLAGS = $(shell pkg-config --libs ncurses)
|
||||||
CFLAGS = -march=native -mtune=native -O3 -pipe -O3 -s -std=c99 -W -pedantic $(shell pkg-config --cflags ncurses) -Wall -Wextra # -Werror
|
CFLAGS = -march=native -mtune=native -O3 -pipe -O3 -s -std=c99 -W -pedantic $(shell pkg-config --cflags ncurses) -Wall -Wextra # -Werror
|
||||||
CC=cc
|
CC=cc
|
||||||
CONF = config.h
|
|
||||||
DEFCONF = config.def.h
|
|
||||||
PREFIX ?= /usr/local
|
PREFIX ?= /usr/local
|
||||||
|
|
||||||
BINDIR = $(PREFIX)/bin
|
BINDIR = $(PREFIX)/bin
|
||||||
|
@ -18,13 +16,10 @@ MANDIR = $(PREFIX)/share/man/man1
|
||||||
|
|
||||||
.PHONY: all install uninstall clean
|
.PHONY: all install uninstall clean
|
||||||
|
|
||||||
all: $(TARGET)
|
$(TARGET): $(SRC)
|
||||||
|
|
||||||
$(TARGET): $(CONF) $(SRC)
|
|
||||||
$(CC) $(CFLAGS) $(LDFLAGS) $(SRC) -o $@
|
$(CC) $(CFLAGS) $(LDFLAGS) $(SRC) -o $@
|
||||||
|
|
||||||
$(CONF):
|
all: $(TARGET)
|
||||||
cp -v $(DEFCONF) $(CONF)
|
|
||||||
|
|
||||||
install: $(TARGET)
|
install: $(TARGET)
|
||||||
mkdir -p $(DESTDIR)$(BINDIR)
|
mkdir -p $(DESTDIR)$(BINDIR)
|
||||||
|
@ -40,3 +35,5 @@ uninstall:
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
$(RM) $(TARGET)
|
$(RM) $(TARGET)
|
||||||
|
|
||||||
|
ccc.o: $(CONF)
|
||||||
|
|
6
ccc.c
6
ccc.c
|
@ -10,10 +10,7 @@
|
||||||
|
|
||||||
#include "file.h"
|
#include "file.h"
|
||||||
#include "util.h"
|
#include "util.h"
|
||||||
|
#include "config.h"
|
||||||
#define ESC 0x1B /* \e or \033 */
|
|
||||||
#define PH 1 /* panel height */
|
|
||||||
#define JUMP_NUM 14 /* how long ctrl + u/d jump are */
|
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
WINDOW *window;
|
WINDOW *window;
|
||||||
|
@ -93,6 +90,7 @@ int main(int argc, char** argv)
|
||||||
}
|
}
|
||||||
ch = getch();
|
ch = getch();
|
||||||
switch (ch) {
|
switch (ch) {
|
||||||
|
|
||||||
/* quit */
|
/* quit */
|
||||||
case 'q':
|
case 'q':
|
||||||
endwin();
|
endwin();
|
||||||
|
|
3
config.h
3
config.h
|
@ -0,0 +1,3 @@
|
||||||
|
#define ESC 0x1B /* \e or \033 */
|
||||||
|
#define PH 1 /* panel height */
|
||||||
|
#define JUMP_NUM 14 /* how long ctrl + u/d jump are */
|
Loading…
Reference in a new issue