Makefile (587B)
1 NAME=$(shell basename ${PWD}) 2 SRC=$(wildcard *.c src/*.c) 3 DEPS:=$(wildcard *.h src/*.h) 4 OBJ:=$(SRC:.c=.o) 5 LIBS:=libwebp libwebpdemux 6 CFLAGS=-Og -g -std=c99 -Werror -Wall -Wextra -I. -I./src/ ${shell pkg-config --cflags $(LIBS)} 7 LDFLAGS=-lc ${shell pkg-config --libs $(LIBS)} 8 9 ifeq ($(CC),tcc) 10 CFLAGS+=-b -bt8 11 endif 12 13 all: $(NAME) 14 15 .PHONY: clean run test 16 17 clean: 18 @rm -f $(OBJ) $(NAME) 19 20 %.o : %.c $(DEPS) 21 @$(CC) $(CFLAGS) -c $< -o $@ 22 23 $(NAME): $(OBJ) 24 @$(CC) $(OBJ) -o $@ $(LDFLAGS) $(CFLAGS) 25 26 run: $(NAME) 27 @./$(NAME) 28 29 test: $(NAME) 30 @./$(NAME) FlanClap.webp 7 31 feh atlas_FlanClap.webp