summaryrefslogtreecommitdiff
path: root/tools/ucl
diff options
context:
space:
mode:
Diffstat (limited to 'tools/ucl')
-rw-r--r--tools/ucl/src/Makefile25
1 files changed, 13 insertions, 12 deletions
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