From ca761a910c25197b10aeadcb0120dae132442d56 Mon Sep 17 00:00:00 2001 From: Tomasz Kramkowski Date: Mon, 26 Mar 2018 16:38:09 +0100 Subject: init commit --- Makefile | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 Makefile (limited to 'Makefile') diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..df93833 --- /dev/null +++ b/Makefile @@ -0,0 +1,33 @@ +# 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)) + +OBJ := gltest.o loadgl.o eprintf.o vert.o frag.o +DEP := $(OBJ:.o=.d) + +%.o: %.glsl + $(LD) -r -b binary $(OUTPUT_OPTION) $< + +all: $(PROG) +$(PROG): $(OBJ) +clean: + $(RM) $(OBJ) $(DEP) $(PROG) + +include $(EPRINTF_PATH)/module.mk +deplinks: $(EPRINTF_FILES) + +-include $(DEP) + +.PHONY: all clean -- cgit v1.2.3-54-g00ecf