diff --git a/Makefile.base.mk b/Makefile.base.mk index 5320c54f..83d64e65 100644 --- a/Makefile.base.mk +++ b/Makefile.base.mk @@ -317,6 +317,15 @@ HAVE_CAIRO_OR_OPENGL = true endif +# --------------------------------------------------------------------------------------------------------------------- +# Set Stub specific stuff + +ifeq ($(HAIKU_OR_MACOS_OR_WINDOWS),true) +HAVE_STUB = true +else +HAVE_STUB = $(HAVE_X11) +endif + # --------------------------------------------------------------------------------------------------------------------- # Set Vulkan specific stuff diff --git a/dgl/Makefile b/dgl/Makefile index ff7fa1e7..35068125 100644 --- a/dgl/Makefile +++ b/dgl/Makefile @@ -67,6 +67,16 @@ endif # --------------------------------------------------------------------------------------------------------------------- +OBJS_stub = $(OBJS_common) + +ifeq ($(MACOS),true) +OBJS_stub += ../build/dgl/pugl.mm.o +else +OBJS_stub += ../build/dgl/pugl.cpp.o +endif + +# --------------------------------------------------------------------------------------------------------------------- + OBJS_vulkan = $(OBJS_common) \ ../build/dgl/Vulkan.cpp.vulkan.o @@ -88,6 +98,10 @@ TARGETS += ../build/libdgl-opengl.a TARGETS += ../build/libdgl.a endif +ifeq ($(HAVE_STUB),true) +TARGETS += ../build/libdgl-stub.a +endif + ifeq ($(HAVE_VULKAN),true) TARGETS += ../build/libdgl-vulkan.a endif @@ -110,6 +124,12 @@ all: $(TARGETS) $(SILENT)rm -f $@ $(SILENT)$(AR) crs $@ $^ +../build/libdgl-stub.a: $(OBJS_stub) + -@mkdir -p ../build + @echo "Creating libdgl-stub.a" + $(SILENT)rm -f $@ + $(SILENT)$(AR) crs $@ $^ + ../build/libdgl-vulkan.a: $(OBJS_vulkan) -@mkdir -p ../build @echo "Creating libdgl-vulkan.a" @@ -187,6 +207,7 @@ debug: -include $(OBJS_common:%.o=%.d) -include $(OBJS_cairo:%.o=%.d) -include $(OBJS_opengl:%.o=%.d) +-include $(OBJS_stub:%.o=%.d) -include $(OBJS_vulkan:%.o=%.d) # ---------------------------------------------------------------------------------------------------------------------