aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorTomasz Kramkowski <tk@the-tk.com>2018-03-26 16:38:09 +0100
committerTomasz Kramkowski <tk@the-tk.com>2018-03-26 19:49:24 +0100
commitca761a910c25197b10aeadcb0120dae132442d56 (patch)
treef28b134d78b87628178fb28130728c56c9949f26 /Makefile
downloadfaqe-ca761a910c25197b10aeadcb0120dae132442d56.tar.gz
faqe-ca761a910c25197b10aeadcb0120dae132442d56.tar.xz
faqe-ca761a910c25197b10aeadcb0120dae132442d56.zip
init commit
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile33
1 files changed, 33 insertions, 0 deletions
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 <tk@the-tk.com>
+# 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