diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..366e666 --- /dev/null +++ b/Makefile @@ -0,0 +1,36 @@ +-include config.mk +include glslv.mk + +PROG := vulkan + +EPRINTF_PATH ?= ../eprintf +PKG_CONFIG ?= pkg-config +LN ?= ln -sf + +LIBS := vulkan glfw3 +CPPFLAGS += -D_POSIX_C_SOURCE=200112L -DGLFW_INCLUDE_VULKAN +CFLAGS += $(shell $(PKG_CONFIG) --cflags $(LIBS)) -std=c11 -MMD -MP +LDFLAGS += -Wl,--as-needed +LDLIBS += $(shell $(PKG_CONFIG) --libs $(LIBS)) +GLSLVFLAGS += -V + +OBJ := vulkan.o eprintf.o strlist.o fragment.o vertex.o +ifeq ("$(WITH_VALIDATION)", "yes") + CPPFLAGS += -DWITH_VALIDATION + OBJ += validation.o +endif + +DEP := $(OBJ:.o=.d) + +all: $(PROG) +$(PROG): $(OBJ) +clean: + $(RM) $(OBJ) $(DEP) $(PROG) + +include $(EPRINTF_PATH)/module.mk +deplinks: $(EPRINTF_FILES) + +-include $(DEP) + +.PHONY: all clean + |