summaryrefslogtreecommitdiff
path: root/utils/rbutilqt/msvc/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'utils/rbutilqt/msvc/Makefile')
-rw-r--r--utils/rbutilqt/msvc/Makefile61
1 files changed, 61 insertions, 0 deletions
diff --git a/utils/rbutilqt/msvc/Makefile b/utils/rbutilqt/msvc/Makefile
new file mode 100644
index 0000000000..014e7c87a2
--- /dev/null
+++ b/utils/rbutilqt/msvc/Makefile
@@ -0,0 +1,61 @@
1# __________ __ ___.
2# Open \______ \ ____ ____ | | _\_ |__ _______ ___
3# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
4# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
5# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
6#
7
8ifndef V
9SILENT = @
10endif
11# The rbspeex Makefile has problems with msys' path mangling as well as running
12# MSVC's lib tool. Use TOP instead of pwd. This means the resulting files will
13# always be placed in this folder.
14# On Linux use the current folder instead.
15TOP := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
16
17LIBS = ipodpatcher sansapatcher chinachippatcher \
18 mkamsboot mkimxboot mkmpioboot mktccboot \
19 ucl rbspeex
20
21# on Windows uname is not available. However, the environment variable OS holds
22# Windows_NT so check that instead.
23ifneq ($(OS),Windows_NT)
24PWD=$(shell pwd)
25RM=rm -rf
26all: dll
27else
28PWD=$(abspath $(TOP))
29RM=del /q /f
30all: lib
31endif
32
33CC=gcc
34dll: $(addsuffix .dll,$(LIBS))
35
36ucl.dll:
37 $(SILENT)$(MAKE) -C ../../../tools/ucl/src \
38 TARGET_DIR=$(PWD)/ OBJDIR=$(PWD)/build-dll/$(basename $@) \
39 CROSS=$(CROSS) CC=$(CC) APPVERSION=dll dll
40rbspeex.dll:
41 $(SILENT)$(MAKE) -C ../../../tools/rbspeex \
42 TARGET_DIR=$(PWD)/ BUILD_DIR=$(PWD)/build-dll/$(basename $@) \
43 CROSS=$(CROSS) CC=$(CC) STATIC=1 APPVERSION=dll dll
44
45%.dll:
46 $(SILENT)$(MAKE) -C ../../$(basename $@) \
47 TARGET_DIR=$(PWD)/ BUILD_DIR=$(PWD)/build-dll/$(basename $@) \
48 CROSS=$(CROSS) CC=$(CC) APPVERSION=dll dll
49
50lib: $(addsuffix .lib,$(LIBS))
51
52%.lib: %.dll
53 @echo LIB $@
54 @lib /machine:x86 /nologo /def:$(basename $<).def
55
56clean:
57 $(RM) $(addsuffix .dll,$(LIBS))
58 $(RM) $(addsuffix .def,$(LIBS))
59 $(RM) $(addsuffix .exp,$(LIBS))
60 $(RM) $(addsuffix .lib,$(LIBS))
61 $(RM) build-dll