summaryrefslogtreecommitdiff
path: root/rbutil/rbutilqt/msvc/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'rbutil/rbutilqt/msvc/Makefile')
-rw-r--r--rbutil/rbutilqt/msvc/Makefile57
1 files changed, 57 insertions, 0 deletions
diff --git a/rbutil/rbutilqt/msvc/Makefile b/rbutil/rbutilqt/msvc/Makefile
new file mode 100644
index 0000000000..929529f0fc
--- /dev/null
+++ b/rbutil/rbutilqt/msvc/Makefile
@@ -0,0 +1,57 @@
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
21ifeq ($(findstring Linux,$(shell uname)),Linux)
22PWD=$(shell pwd)
23all: dll
24else
25PWD=$(abspath $(TOP))
26all: lib
27endif
28
29CC=gcc
30dll: $(addsuffix .dll,$(LIBS))
31
32ucl.dll:
33 $(SILENT)$(MAKE) -C ../../../tools/ucl/src \
34 TARGET_DIR=$(PWD)/ OBJDIR=$(PWD)/build-dll/$(basename $@) \
35 CROSS=$(CROSS) CC=$(CC) APPVERSION=dll dll
36rbspeex.dll:
37 $(SILENT)$(MAKE) -C ../../../tools/rbspeex \
38 TARGET_DIR=$(PWD)/ OUT=$(PWD)/build-dll/$(basename $@) \
39 CROSS=$(CROSS) CC=$(CC) STATIC=1 APPVERSION=dll dll
40
41%.dll:
42 $(SILENT)$(MAKE) -C ../../$(basename $@) \
43 TARGET_DIR=$(PWD)/ BUILD_DIR=$(PWD)/build-dll/$(basename $@) \
44 CROSS=$(CROSS) CC=$(CC) APPVERSION=dll dll
45
46lib: $(addsuffix .lib,$(LIBS))
47
48%.lib: %.dll
49 @echo LIB $@
50 @lib /machine:x86 /nologo /def:$(basename $<).def
51
52clean:
53 rm -rf $(addsuffix .dll,$(LIBS))
54 rm -rf $(addsuffix .def,$(LIBS))
55 rm -rf $(addsuffix .exp,$(LIBS))
56 rm -rf $(addsuffix .lib,$(LIBS))
57 rm -rf build-dll