write-ups-challenges-2022-2023/super-hightech-paint/super-hightech-paint-2/buildfiles/Makefile
2022-11-24 22:59:22 +01:00

28 lines
1.3 KiB
Makefile

CC = gcc
LD = gcc
CC_FLAGS = -Wall -Wextra -Werror -Wno-unused-parameter -Wno-unused-function -Wno-unused-variable
LD_FLAGS = -rdynamic -lgtk-3 -lgdk-3 -lpangocairo-1.0 -lpango-1.0 -lharfbuzz -latk-1.0 -lcairo-gobject -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0 -lcrypto -pthread
SOURCES = $(shell find src/ -name "*.c" -type f)
OBJECTS = ${SOURCES:.c=.o}
INCLUDES = -I ./include -I/usr/include/gtk-3.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0 -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include -I/usr/include/gtk-3.0 -I/usr/include/gio-unix-2.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/fribidi -I/usr/include/harfbuzz -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/uuid -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include
.PHONY = all clean
all: super-hightech-paint
super-hightech-paint: ${OBJECTS}
$(LD) -o $@ $^ $(LD_FLAGS)
src/gtk_stuff.o:
$(CC) ${CC_FLAGS} $(INCLUDES) -c src/gtk_stuff.c -o $@ -O3
%.o: %.c
$(CC) ${CC_FLAGS} $(INCLUDES) -c $< -o $@
clean:
$(info Cleaning dependencies)
rm -rf ${OBJECTS} super-hightech-paint