summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/rbspeex/Makefile24
-rw-r--r--tools/ucl/src/Makefile25
2 files changed, 25 insertions, 24 deletions
diff --git a/tools/rbspeex/Makefile b/tools/rbspeex/Makefile
index a82e80e017..41bf775d38 100644
--- a/tools/rbspeex/Makefile
+++ b/tools/rbspeex/Makefile
@@ -35,7 +35,7 @@ endif
35# This sets up 'SRC' based on the files mentioned in SOURCES 35# This sets up 'SRC' based on the files mentioned in SOURCES
36SRC := $(shell cat $(SPEEXSRC)/SOURCES | $(CC) $(CFLAGS) -E -P - | grep -v "^\#" | grep -v "^$$") 36SRC := $(shell cat $(SPEEXSRC)/SOURCES | $(CC) $(CFLAGS) -E -P - | grep -v "^\#" | grep -v "^$$")
37 37
38OUT = build$(RBARCH) 38OUT = $(TARGET_DIR)build$(RBARCH)
39SOURCES = $(SRC:%.c=$(SPEEXSRC)/%.c) rbspeex.c rbspeexenc.c rbspeexdec.c 39SOURCES = $(SRC:%.c=$(SPEEXSRC)/%.c) rbspeex.c rbspeexenc.c rbspeexdec.c
40OBJS = $(addprefix $(OUT)/,$(SRC:%.c=%.o)) 40OBJS = $(addprefix $(OUT)/,$(SRC:%.c=%.o))
41DEPFILE = $(OUT)/dep-speex 41DEPFILE = $(OUT)/dep-speex
@@ -46,8 +46,8 @@ DIRS =
46all: ../rbspeexenc ../rbspeexdec 46all: ../rbspeexenc ../rbspeexdec
47 47
48$(DEPFILE): $(SOURCES) 48$(DEPFILE): $(SOURCES)
49 @echo MKDIR build$(RBARCH) 49 @echo MKDIR $(OUT)
50 $(SILENT)mkdir -p build$(RBARCH) 50 $(SILENT)mkdir -p $(OUT)
51 @echo Creating dependencies 51 @echo Creating dependencies
52 $(SILENT)rm -f $(DEPFILE) 52 $(SILENT)rm -f $(DEPFILE)
53 $(SILENT)(for each in $(SOURCES) x; do \ 53 $(SILENT)(for each in $(SOURCES) x; do \
@@ -69,7 +69,7 @@ $(OUT)/librbspeex.a: $(OBJS) $(DEPFILE) $(OUT)/rbspeex.o
69 $(SILENT)$(AR) ruv $@ $+ > /dev/null 2>&1 69 $(SILENT)$(AR) ruv $@ $+ > /dev/null 2>&1
70 70
71librbspeex$(RBARCH).a: $(OUT)/librbspeex.a 71librbspeex$(RBARCH).a: $(OUT)/librbspeex.a
72 $(SILENT)cp $(OUT)/librbspeex.a librbspeex$(RBARCH).a 72 $(SILENT)cp $(OUT)/librbspeex.a $(TARGET_DIR)librbspeex$(RBARCH).a
73 73
74../rbspeexenc: $(OBJS) $(OUT)/rbspeexenc.o librbspeex$(RBARCH).a 74../rbspeexenc: $(OBJS) $(OUT)/rbspeexenc.o librbspeex$(RBARCH).a
75 @echo Linking ../rbspeexenc 75 @echo Linking ../rbspeexenc
@@ -86,22 +86,22 @@ librbspeex$(RBARCH).a: $(OUT)/librbspeex.a
86# some trickery to build ppc and i386 from a single call 86# some trickery to build ppc and i386 from a single call
87ifeq ($(RBARCH),) 87ifeq ($(RBARCH),)
88librbspeexi386.a: 88librbspeexi386.a:
89 make RBARCH=i386 librbspeexi386.a 89 make RBARCH=i386 TARGET_DIR=$(TARGET_DIR) librbspeexi386.a
90 90
91librbspeexppc.a: 91librbspeexppc.a:
92 make RBARCH=ppc librbspeexppc.a 92 make RBARCH=ppc TARGET_DIR=$(TARGET_DIR) librbspeexppc.a
93endif 93endif
94 94
95librbspeex-universal: librbspeexi386.a librbspeexppc.a 95librbspeex-universal: librbspeexi386.a librbspeexppc.a
96 @echo lipo librbspeex.a 96 @echo lipo librbspeex.a
97 $(SILENT) rm -f librbspeex.a 97 $(SILENT) rm -f $(TARGET_DIR)librbspeex.a
98 lipo -create librbspeexppc.a librbspeexi386.a -output librbspeex.a 98 lipo -create $(TARGET_DIR)librbspeexppc.a $(TARGET_DIR)librbspeexi386.a -output $(TARGET_DIR)librbspeex.a
99 99
100clean: 100clean:
101 rm -f $(OBJS) librbspeex* ../rbspeexenc ../rbspeexdec dep-speex 101 rm -f $(OBJS) $(TARGET_DIR)librbspeex* ../rbspeexenc ../rbspeexdec $(TARGET_DIR)dep-speex
102 rm -rf build* 102 rm -rf build*
103 103
104build$(RBARCH): 104$(OUT):
105 @echo MKDIR build$(RBARCH) 105 @echo MKDIR $(OUT)
106 $(SILENT)mkdir build$(RBARCH) 106 $(SILENT)mkdir $(OUT)
107 107
diff --git a/tools/ucl/src/Makefile b/tools/ucl/src/Makefile
index b4b841a4f1..147959aaa1 100644
--- a/tools/ucl/src/Makefile
+++ b/tools/ucl/src/Makefile
@@ -17,7 +17,8 @@ ifdef RBARCH
17CFLAGS += -arch $(RBARCH) 17CFLAGS += -arch $(RBARCH)
18endif 18endif
19 19
20OUT = build$(RBARCH) 20
21OUT = $(TARGET_DIR)build$(RBARCH)
21 22
22SOURCES = alloc.c io.c n2b_99.c n2b_d.c n2b_ds.c n2b_to.c n2d_99.c \ 23SOURCES = alloc.c io.c n2b_99.c n2b_d.c n2b_ds.c n2b_to.c n2d_99.c \
23 n2d_d.c n2d_ds.c n2d_to.c n2e_99.c n2e_d.c n2e_ds.c n2e_to.c ucl_crc.c \ 24 n2d_d.c n2d_ds.c n2d_to.c n2e_99.c n2e_d.c n2e_ds.c n2e_to.c ucl_crc.c \
@@ -30,8 +31,8 @@ OBJS = $(OUT)/alloc.o $(OUT)/io.o $(OUT)/n2b_99.o $(OUT)/n2b_d.o $(OUT)/n2b_ds.o
30# we don't use $(AR) and $(RANLIB) below since we want the _native_ tools 31# we don't use $(AR) and $(RANLIB) below since we want the _native_ tools
31# not the cross-compiler tools 32# not the cross-compiler tools
32libucl$(RBARCH).a: $(OUT) $(OBJS) 33libucl$(RBARCH).a: $(OUT) $(OBJS)
33 $(SILENT)ar ruv $@ $(OBJS) >/dev/null 2>&1 34 $(SILENT)ar ruv $(TARGET_DIR)$@ $(OBJS) >/dev/null 2>&1
34 $(SILENT)ranlib $@ 35 $(SILENT)ranlib $(TARGET_DIR)$@
35 36
36$(OUT)/%.o: %.c 37$(OUT)/%.o: %.c
37 @echo CC $< 38 @echo CC $<
@@ -40,22 +41,22 @@ $(OUT)/%.o: %.c
40# some trickery to build ppc and i386 from a single call 41# some trickery to build ppc and i386 from a single call
41ifeq ($(RBARCH),) 42ifeq ($(RBARCH),)
42libucli386.a: 43libucli386.a:
43 make RBARCH=i386 libucli386.a 44 make RBARCH=i386 TARGET_DIR=$(TARGET_DIR) libucli386.a
44 45
45libuclppc.a: 46libuclppc.a:
46 make RBARCH=ppc libuclppc.a 47 make RBARCH=ppc TARGET_DIR=$(TARGET_DIR) libuclppc.a
47endif 48endif
48 49
49libucl-universal: libucli386.a libuclppc.a 50libucl-universal: libucli386.a libuclppc.a
50 @echo lipo libucl.a 51 @echo lipo $(TARGET_DIR)libucl.a
51 $(SILENT) rm -f libucl.a 52 $(SILENT) rm -f $(TARGET_DIR)libucl.a
52 lipo -create libuclppc.a libucli386.a -output libucl.a 53 lipo -create $(TARGET_DIR)libuclppc.a $(TARGET_DIR)libucli386.a -output $(TARGET_DIR)libucl.a
53 54
54clean: 55clean:
55 rm -f libucl*.a 56 rm -f $(TARGET_DIR)libucl*.a
56 rm -rf build* 57 rm -rf build*
57 58
58build$(RBARCH): 59$(OUT):
59 @echo MKDIR build$(RBARCH) 60 @echo MKDIR $(OUT)
60 $(SILENT)mkdir build$(RBARCH) 61 $(SILENT)mkdir $(OUT)
61 62