Lot of small changes

This commit is contained in:
tonitch committed 2024-01-09 16:08:23 +01:00
1 parent 695f79c9ee
commit 666c87e30c
9 files changed
+166 -83

No files matched your search

+31
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