# Copyright (C) 2018 Tomasz Kramkowski # SPDX-License-Identifier: MIT -include config.mk PROG := gltest EPRINTF_PATH ?= ../eprintf PKG_CONFIG ?= pkg-config LN ?= ln -sf LIBS := glfw3 CPPFLAGS += -D__gl_h_ CFLAGS += $(shell $(PKG_CONFIG) --cflags $(LIBS)) -std=c11 -MMD -MP LDFLAGS += -Wl,--as-needed LDLIBS += $(shell $(PKG_CONFIG) --libs $(LIBS)) -lm OBJ := gltest.o loadgl.o eprintf.o glprog.o assets.o assets_data.o all: $(PROG) $(PROG): $(OBJ) gltest.o: assets.h loadgl.o gltest.o glprog.o: loadgl.h loadgl.c loadgl.h: loadgl.%: loadgl.m4 loadgl.%.in m4 $^ >$@ CLEAN += loadgl.c loadgl.h include assets.mk include $(EPRINTF_PATH)/module.mk deplinks: $(EPRINTF_FILES) DEP := $(OBJ:.o=.d) clean: $(RM) $(OBJ) $(DEP) $(PROG) $(CLEAN) -include $(DEP) .PHONY: all clean