Lot of small changes

This commit is contained in:
2024-01-03 11:04:20 +01:00
parent 71b5d1313a
commit 00c6530485
9 changed files with 166 additions and 83 deletions

View File

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