This commit is contained in:
Debucquoy Anthony 2024-01-10 14:46:47 +01:00
parent 00c6530485
commit 6f1a904990
Signed by: tonitch
GPG Key ID: A78D6421F083D42E
3 changed files with 9 additions and 9 deletions

View File

@ -1,31 +1,30 @@
snippet base "tonitch's makefile base" b
.PHONY: all clean run
VERSION = 0.0.1
LIBS =
LIBS = $2
CMACRO = -DVERSION=\"$(VERSION)\"
CC = gcc
CFLAGS = -g -Wall -Wextra -pedantic $(shell pkg-config $(LIBS) --cflags) $(CMACRO)
LDFLAGS = $(shell pkg-config $(LIBS) --libs)
all: main
all: ${1:${VISUAL:main}}
main: main.o
$(CC) $(CFLAGS) -o $@ $< $(LDFLAGS)
$1: $1.o
$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)
%.o: %.c
$(CC) $(CFLAGS) -c -o $@ $<
$0
clean:
rm -f *.o
rm -f main
rm -f $1
bear: clean
bear -- make
run: main
run: $1
./$<
endsnippet

View File

@ -27,7 +27,7 @@ function s:make(args) abort
let cmd .= ' ' . a:args
endif
let options = {'close_cb': function('s:make_callback'), 'term_rows': 16}
let options = {'close_cb': function('s:make_callback'), 'term_rows': 8}
let s:make_buf = term_start(cmd, options)
let s:making = 1

View File

@ -94,6 +94,7 @@ set nowrap
set nu
set rnu
set shiftwidth=4
set scrolloff=10
set showcmd
set spelllang+=fr
set splitbelow splitright