diff options
Diffstat (limited to 'tools/ucl/src/Makefile')
-rw-r--r-- | tools/ucl/src/Makefile | 25 |
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 | |||
17 | CFLAGS += -arch $(RBARCH) | 17 | CFLAGS += -arch $(RBARCH) |
18 | endif | 18 | endif |
19 | 19 | ||
20 | OUT = build$(RBARCH) | 20 | |
21 | OUT = $(TARGET_DIR)build$(RBARCH) | ||
21 | 22 | ||
22 | SOURCES = alloc.c io.c n2b_99.c n2b_d.c n2b_ds.c n2b_to.c n2d_99.c \ | 23 | SOURCES = 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 |
32 | libucl$(RBARCH).a: $(OUT) $(OBJS) | 33 | libucl$(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 |
41 | ifeq ($(RBARCH),) | 42 | ifeq ($(RBARCH),) |
42 | libucli386.a: | 43 | libucli386.a: |
43 | make RBARCH=i386 libucli386.a | 44 | make RBARCH=i386 TARGET_DIR=$(TARGET_DIR) libucli386.a |
44 | 45 | ||
45 | libuclppc.a: | 46 | libuclppc.a: |
46 | make RBARCH=ppc libuclppc.a | 47 | make RBARCH=ppc TARGET_DIR=$(TARGET_DIR) libuclppc.a |
47 | endif | 48 | endif |
48 | 49 | ||
49 | libucl-universal: libucli386.a libuclppc.a | 50 | libucl-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 | ||
54 | clean: | 55 | clean: |
55 | rm -f libucl*.a | 56 | rm -f $(TARGET_DIR)libucl*.a |
56 | rm -rf build* | 57 | rm -rf build* |
57 | 58 | ||
58 | build$(RBARCH): | 59 | $(OUT): |
59 | @echo MKDIR build$(RBARCH) | 60 | @echo MKDIR $(OUT) |
60 | $(SILENT)mkdir build$(RBARCH) | 61 | $(SILENT)mkdir $(OUT) |
61 | 62 | ||