diff --git a/examples/Makefile b/examples/Makefile index 64bc326..b5710fb 100644 --- a/examples/Makefile +++ b/examples/Makefile @@ -11,11 +11,12 @@ include ../dpf/dgl/Makefile.mk BUILD_CXX_FLAGS += -I../dpf/dgl LINK_FLAGS += -L../dpf -ldgl $(DGL_LIBS) +WINDRES ?= windres + # -------------------------------------------------------------- ifeq ($(WIN32),true) TARGETS = app.exe color.exe demo.exe images.exe rectangles.exe -LINK_FLAGS += -mwindows else TARGETS = app color demo images rectangles endif @@ -26,18 +27,13 @@ all: ../libdgl.a $(TARGETS) build: $(TARGETS) clean: - $(RM) $(TARGETS) + rm -f $(TARGETS) win32/distrho.o debug: $(MAKE) DEBUG=true # -------------------------------------------------------------- -%.exe: % - rm -f $*.exe - mv $* $*.exe - ln -sf $*.exe $* - ../libdgl.a: .FORCE $(MAKE) -C ../dpf/dgl @@ -68,6 +64,14 @@ text: text.cpp ../dgl/* # -------------------------------------------------------------- +%.exe: %.cpp win32/distrho.o + $(CXX) $^ $(BUILD_CXX_FLAGS) $(LINK_FLAGS) -mwindows -o $@ + +win32/distrho.o: win32/distrho.rc + $(WINDRES) -i $< -o $@ -O coff + +# -------------------------------------------------------------- + .FORCE: .PHONY: .FORCE diff --git a/examples/win32/distrho.ico b/examples/win32/distrho.ico new file mode 100644 index 0000000..266483f Binary files /dev/null and b/examples/win32/distrho.ico differ diff --git a/examples/win32/distrho.rc b/examples/win32/distrho.rc new file mode 100644 index 0000000..06e16b7 --- /dev/null +++ b/examples/win32/distrho.rc @@ -0,0 +1 @@ +id ICON "distrho.ico"