summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tools/rbspeex/Makefile22
1 files changed, 13 insertions, 9 deletions
diff --git a/tools/rbspeex/Makefile b/tools/rbspeex/Makefile
index 446d658ec8..86f00a1847 100644
--- a/tools/rbspeex/Makefile
+++ b/tools/rbspeex/Makefile
@@ -70,30 +70,33 @@ $(DEPFILE): $(SOURCES)
70 70
71-include $(DEPFILE) 71-include $(DEPFILE)
72 72
73dll: rbspeex.dll 73dll: $(TARGET_DIR)rbspeex.dll
74rbspeex.dll: $(OUT)/rbspeex.dll 74
75$(OUT)/rbspeex.dll: $(OBJS) $(OUT)/rbspeex.o 75$(TARGET_DIR)rbspeex.dll: $(OBJS) $(OUT)/rbspeex.o
76 @echo DLL $(notdir $@) 76 @echo DLL $(notdir $@)
77 $(SILENT)$(CC) $(CFLAGS) -shared -o $@ $^ -Wl,--output-def,$(OUT)/rbspeex.def 77 $(SILENT)$(CROSS)$(CC) $(CFLAGS) -shared -o $@ $^ \
78 -Wl,--output-def,$(TARGET_DIR)rbspeex.def
78 79
79$(OUT)/librbspeex.a: $(OBJS) $(DEPFILE) $(OUT)/rbspeex.o 80$(OUT)/librbspeex.a: $(OBJS) $(DEPFILE) $(OUT)/rbspeex.o
80 @echo AR $(notdir $@) 81 @echo AR $(notdir $@)
81 $(SILENT)$(AR) rucs $@ $+ > /dev/null 2>&1 82 $(SILENT)$(CROSS)$(AR) rucs $@ $+ > /dev/null 2>&1
82 83
83librbspeex$(RBARCH).a: $(OUT)/librbspeex.a 84librbspeex$(RBARCH).a: $(OUT)/librbspeex.a
84 $(SILENT)cp $(OUT)/librbspeex.a $(TARGET_DIR)librbspeex$(RBARCH).a 85 $(SILENT)cp $(OUT)/librbspeex.a $(TARGET_DIR)librbspeex$(RBARCH).a
85 86
86../rbspeexenc: $(OBJS) $(OUT)/rbspeexenc.o librbspeex$(RBARCH).a 87../rbspeexenc: $(OBJS) $(OUT)/rbspeexenc.o librbspeex$(RBARCH).a
87 @echo Linking ../rbspeexenc 88 @echo Linking ../rbspeexenc
88 $(SILENT)$(CC) $(CFLAGS) -o ../rbspeexenc $(OUT)/rbspeexenc.o $(LIBS) -lm $(TARGET_DIR)librbspeex$(RBARCH).a 89 $(SILENT)$(CROSS)$(CC) $(CFLAGS) -o ../rbspeexenc $(OUT)/rbspeexenc.o \
90 $(LIBS) -lm $(TARGET_DIR)librbspeex$(RBARCH).a
89 91
90../rbspeexdec: $(OBJS) librbspeex$(RBARCH).a $(OUT)/rbspeexdec.o 92../rbspeexdec: $(OBJS) librbspeex$(RBARCH).a $(OUT)/rbspeexdec.o
91 @echo Linking ../rbspeexdec 93 @echo Linking ../rbspeexdec
92 $(SILENT)$(CC) $(CFLAGS) -o ../rbspeexdec $(OUT)/rbspeexdec.o $(LIBS) -lm $(TARGET_DIR)librbspeex$(RBARCH).a 94 $(SILENT)$(CROSS)$(CC) $(CFLAGS) -o ../rbspeexdec $(OUT)/rbspeexdec.o \
95 $(LIBS) -lm $(TARGET_DIR)librbspeex$(RBARCH).a
93 96
94%.o: 97%.o:
95 @echo CC $< 98 @echo CC $<
96 $(SILENT)$(CC) $(CFLAGS) -c $< -o $@ 99 $(SILENT)$(CROSS)$(CC) $(CFLAGS) -c $< -o $@
97 100
98# some trickery to build ppc and i386 from a single call 101# some trickery to build ppc and i386 from a single call
99ifeq ($(RBARCH),) 102ifeq ($(RBARCH),)
@@ -107,7 +110,8 @@ endif
107librbspeex-universal: librbspeexi386.a librbspeexppc.a 110librbspeex-universal: librbspeexi386.a librbspeexppc.a
108 @echo lipo librbspeex.a 111 @echo lipo librbspeex.a
109 $(SILENT) rm -f $(TARGET_DIR)librbspeex.a 112 $(SILENT) rm -f $(TARGET_DIR)librbspeex.a
110 $(SILENT)lipo -create $(TARGET_DIR)librbspeexppc.a $(TARGET_DIR)librbspeexi386.a -output $(TARGET_DIR)librbspeex.a 113 $(SILENT)lipo -create $(TARGET_DIR)librbspeexppc.a \
114 $(TARGET_DIR)librbspeexi386.a -output $(TARGET_DIR)librbspeex.a
111 115
112clean: 116clean:
113 rm -f $(OBJS) $(TARGET_DIR)librbspeex* ../rbspeexenc ../rbspeexdec $(TARGET_DIR)dep-speex 117 rm -f $(OBJS) $(TARGET_DIR)librbspeex* ../rbspeexenc ../rbspeexdec $(TARGET_DIR)dep-speex