diff options
author | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2015-06-20 20:44:17 +0200 |
---|---|---|
committer | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2015-06-20 20:47:35 +0200 |
commit | 465eb727a30fd1f4470ff6c172f7b41856775167 (patch) | |
tree | f6eac6d54ede4f9b50226062b557a4de8abbd48b | |
parent | 226922efe3791c3b7cb06c893e18b694f7390865 (diff) | |
download | rockbox-465eb727a30fd1f4470ff6c172f7b41856775167.tar.gz rockbox-465eb727a30fd1f4470ff6c172f7b41856775167.zip |
Fix rebuilding librbspeex on OS X and make rm work on Windows.
OS X ar operates on fat libaries and cannot update existing archives. Remove it
first to avoid this.
Use a make function when removing files to allow calling the correct command on
Windows, which doesn't know about rm.
Change-Id: Ia0c13ef7907239a1e6f4abc26bb08238a226c476
-rw-r--r-- | tools/rbspeex/Makefile | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/tools/rbspeex/Makefile b/tools/rbspeex/Makefile index 89e21f8022..a4f337f455 100644 --- a/tools/rbspeex/Makefile +++ b/tools/rbspeex/Makefile | |||
@@ -13,8 +13,10 @@ endif | |||
13 | 13 | ||
14 | ifeq ($(OS),Windows_NT) | 14 | ifeq ($(OS),Windows_NT) |
15 | mkdir = if not exist $(subst /,\,$(1)) mkdir $(subst /,\,$(1)) | 15 | mkdir = if not exist $(subst /,\,$(1)) mkdir $(subst /,\,$(1)) |
16 | rm = if exist $(subst /,\,$(1)) del /q /s $(subst /,\,$(1)) | ||
16 | else | 17 | else |
17 | mkdir = mkdir -p $(1) | 18 | mkdir = mkdir -p $(1) |
19 | rm = rm -rf $(1) | ||
18 | endif | 20 | endif |
19 | 21 | ||
20 | SPEEXSRC = ../../lib/rbcodec/codecs/libspeex | 22 | SPEEXSRC = ../../lib/rbcodec/codecs/libspeex |
@@ -100,6 +102,7 @@ $(TARGET_DIR)rbspeex.dll: $(OBJS) $(BUILD_DIR)/rbspeex.o | |||
100 | 102 | ||
101 | $(TARGET_DIR)librbspeex.a: $(OBJS) $(BUILD_DIR)/rbspeex.o | 103 | $(TARGET_DIR)librbspeex.a: $(OBJS) $(BUILD_DIR)/rbspeex.o |
102 | @echo AR $(notdir $@) | 104 | @echo AR $(notdir $@) |
105 | $(SILENT)$(call rm,$@) | ||
103 | $(SILENT)$(CROSS)$(AR) rcs $@ $^ | 106 | $(SILENT)$(CROSS)$(AR) rcs $@ $^ |
104 | 107 | ||
105 | librbspeex.a: $(TARGET_DIR)librbspeex.a | 108 | librbspeex.a: $(TARGET_DIR)librbspeex.a |
@@ -119,9 +122,9 @@ librbspeex.a: $(TARGET_DIR)librbspeex.a | |||
119 | $(SILENT)$(CROSS)$(CC) $(CFLAGS) $(ARCHFLAGS) -c $< -o $@ | 122 | $(SILENT)$(CROSS)$(CC) $(CFLAGS) $(ARCHFLAGS) -c $< -o $@ |
120 | 123 | ||
121 | clean: | 124 | clean: |
122 | rm -f $(OBJS) $(TARGET_DIR)librbspeex* ../rbspeexenc ../rbspeexdec | 125 | $(call rm,$(OBJS) $(TARGET_DIR)librbspeex* ../rbspeexenc ../rbspeexdec) |
123 | rm -f $(DEPS) | 126 | $(call rm,$(DEPS)) |
124 | rm -rf build* | 127 | $(call rm,build*) |
125 | 128 | ||
126 | $(BUILD_DIR): | 129 | $(BUILD_DIR): |
127 | @echo MKDIR $(BUILD_DIR) | 130 | @echo MKDIR $(BUILD_DIR) |