yaitaa/Makefile

22 lines
538 B
Makefile
Raw Normal View History

CFLAGS := -Wall -Wextra -Werror -pedantic -std=c99 -Wno-attributes
2022-01-30 23:04:56 +03:00
CLIBS := -lm
INCLUDES := -Isrc
2022-01-31 14:40:06 +03:00
OBJECTS := obj/stb_image.o obj/stb_image_resize.o \
obj/colors.o obj/args.o obj/image.o obj/commons.o \
obj/mod_blocks.o obj/mod_braille.o
VERSION := "v-git-$(shell git rev-parse --short HEAD)"
2022-01-30 23:04:56 +03:00
all: lib yaitaa
2022-01-30 23:04:56 +03:00
lib: $(OBJECTS)
clean:
$(RM) yaitaa obj/*
2022-01-30 23:04:56 +03:00
yaitaa: lib
$(CC) $(CFLAGS) src/main.c $(INCLUDES) $(OBJECTS) $(CLIBS) -o ./yaitaa
2022-01-30 23:04:56 +03:00
obj/%.o: src/%.c
$(CC) $(CFLAGS) $^ $(INCLUDES) -DVERSION="\"$(VERSION)\"" -c -o $@
2022-01-30 23:04:56 +03:00