From 70abc1f30f772757088b13d97256423385156080 Mon Sep 17 00:00:00 2001 From: Squibid Date: Wed, 15 Feb 2023 23:11:33 -0500 Subject: Major changes including better ui and more keybinds :) --- lua/core/snippets/makefile.lua | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 lua/core/snippets/makefile.lua (limited to 'lua/core/snippets/makefile.lua') diff --git a/lua/core/snippets/makefile.lua b/lua/core/snippets/makefile.lua new file mode 100644 index 0000000..d15ef8d --- /dev/null +++ b/lua/core/snippets/makefile.lua @@ -0,0 +1,41 @@ +ls.add_snippets('make', { + s({ + name = "Start Makefile", + trig = "make", + dscr = "simple starter make file" + }, + fmta( + [[ + # flags and incs + CFLAGS = + INCS =
.c + + PREFIX = + + # compiler and linker + CC = cc + + all: + : .o + $(CC) .o $(CFLAGS) -o $@ + .o: $(INCS) + + clean: + rm -f *.o + + install: + mkdir -p $(PREFIX)/bin + cp -f $(PREFIX)/bin + chmod 755 $(PREFIX)/bin/ + uninstall: + rm -f $(PREFIX)/bin/ + ]], + { + FLAGS = i(1, "-Wall"), + MAIN = i(2, "main"), + PREFIX = i(3, "/usr/local"), + MAINA = ri(2), + } + ) + ), +}) -- cgit v1.2.1