diff options
author | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2021-12-15 21:04:28 +0100 |
---|---|---|
committer | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2021-12-24 18:05:53 +0100 |
commit | c876d3bbefe0dc00c27ca0c12d29da5874946962 (patch) | |
tree | 69f468a185a369b01998314bc3ecc19b70f4fcaa /utils/rbutilqt/msvc/Makefile | |
parent | 6c6f0757d7a902feb293be165d1490c42bc8e7ad (diff) | |
download | rockbox-c876d3bbefe0dc00c27ca0c12d29da5874946962.tar.gz rockbox-c876d3bbefe0dc00c27ca0c12d29da5874946962.zip |
rbutil: Merge rbutil with utils folder.
rbutil uses several components from the utils folder, and can be
considered part of utils too. Having it in a separate folder is an
arbitrary split that doesn't help anymore these days, so merge them.
This also allows other utils to easily use libtools.make without the
need to navigate to a different folder.
Change-Id: I3fc2f4de19e3e776553efb5dea5f779dfec0dc21
Diffstat (limited to 'utils/rbutilqt/msvc/Makefile')
-rw-r--r-- | utils/rbutilqt/msvc/Makefile | 61 |
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 | |||
8 | ifndef V | ||
9 | SILENT = @ | ||
10 | endif | ||
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. | ||
15 | TOP := $(dir $(abspath $(lastword $(MAKEFILE_LIST)))) | ||
16 | |||
17 | LIBS = 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. | ||
23 | ifneq ($(OS),Windows_NT) | ||
24 | PWD=$(shell pwd) | ||
25 | RM=rm -rf | ||
26 | all: dll | ||
27 | else | ||
28 | PWD=$(abspath $(TOP)) | ||
29 | RM=del /q /f | ||
30 | all: lib | ||
31 | endif | ||
32 | |||
33 | CC=gcc | ||
34 | dll: $(addsuffix .dll,$(LIBS)) | ||
35 | |||
36 | ucl.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 | ||
40 | rbspeex.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 | |||
50 | lib: $(addsuffix .lib,$(LIBS)) | ||
51 | |||
52 | %.lib: %.dll | ||
53 | @echo LIB $@ | ||
54 | @lib /machine:x86 /nologo /def:$(basename $<).def | ||
55 | |||
56 | clean: | ||
57 | $(RM) $(addsuffix .dll,$(LIBS)) | ||
58 | $(RM) $(addsuffix .def,$(LIBS)) | ||
59 | $(RM) $(addsuffix .exp,$(LIBS)) | ||
60 | $(RM) $(addsuffix .lib,$(LIBS)) | ||
61 | $(RM) build-dll | ||