Browse Source

Build proper windows binaries (with icon and no console)

pull/1/head
falkTX 11 years ago
parent
commit
87fe1e4370
3 changed files with 12 additions and 7 deletions
  1. +11
    -7
      examples/Makefile
  2. BIN
      examples/win32/distrho.ico
  3. +1
    -0
      examples/win32/distrho.rc

+ 11
- 7
examples/Makefile View File

@@ -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



BIN
examples/win32/distrho.ico View File

Before After

+ 1
- 0
examples/win32/distrho.rc View File

@@ -0,0 +1 @@
id ICON "distrho.ico"

Loading…
Cancel
Save