[U-Boot] [PATCH]Uboot tool Makefile patch for Mac OSX Snow leopard

sungyeon sungyeon at mdstec.com
Thu Jun 2 03:37:01 CEST 2011


diff --git a/tools/Makefile b/tools/Makefile
index 623f908..f794ef1 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -96,11 +96,11 @@ OBJ_FILES-$(CONFIG_SHA1_CHECK_UB_IMG) += ubsha1.o
#endif

# Flattened device tree objects
-LIBFDT_OBJ_FILES-y += fdt.o
-LIBFDT_OBJ_FILES-y += fdt_ro.o
-LIBFDT_OBJ_FILES-y += fdt_rw.o
-LIBFDT_OBJ_FILES-y += fdt_strerror.o
-LIBFDT_OBJ_FILES-y += fdt_wip.o
+LIBFDT_OBJ_FILES-y += lib/libfdt/fdt.o
+LIBFDT_OBJ_FILES-y += lib/libfdt/fdt_ro.o
+LIBFDT_OBJ_FILES-y += lib/libfdt/fdt_rw.o
+LIBFDT_OBJ_FILES-y += lib/libfdt/fdt_strerror.o
+LIBFDT_OBJ_FILES-y += lib/libfdt/fdt_wip.o

# Generated LCD/video logo
LOGO_H = $(OBJTREE)/include/bmp_logo.h
@@ -129,7 +129,7 @@ endif
# now $(obj) is defined
HOSTSRCS += $(addprefix $(SRCTREE)/,$(EXT_OBJ_FILES-y:.o=.c))
HOSTSRCS += $(addprefix $(SRCTREE)/tools/,$(OBJ_FILES-y:.o=.c))
-HOSTSRCS += $(addprefix $(SRCTREE)/lib/libfdt/,$(LIBFDT_OBJ_FILES-y:.o=.c))
+HOSTSRCS += $(addprefix $(SRCTREE)/,$(LIBFDT_OBJ_FILES-y:.o=.c))
BINS	:= $(addprefix $(obj),$(sort $(BIN_FILES-y)))
LIBFDT_OBJS	:= $(addprefix $(obj),$(LIBFDT_OBJ_FILES-y))

@@ -185,7 +185,11 @@ $(obj)mkimage$(SFX):	$(obj)crc32.o \
			$(obj)mkimage.o \
			$(obj)os_support.o \
			$(obj)sha1.o \
-			$(LIBFDT_OBJS)
+			$(obj)fdt.o \
+			$(obj)fdt_ro.o\
+			$(obj)fdt_rw.o\
+			$(obj)fdt_strerror.o\
+			$(obj)fdt_wip.o
	$(HOSTCC) $(HOSTCFLAGS) $(HOSTLDFLAGS) -o $@ $^
	$(HOSTSTRIP) $@

@@ -201,13 +205,13 @@ $(obj)ubsha1$(SFX):	$(obj)os_support.o $(obj)sha1.o $(obj)ubsha1.o
	$(HOSTCC) $(HOSTCFLAGS) $(HOSTLDFLAGS) -o $@ $^

# Some of the tool objects need to be accessed from outside the tools directory
-$(obj)%.o: $(SRCTREE)/common/%.c
+$(subst common/,,$(filter common/%,$(EXT_OBJ_FILES-y))): $(obj)%.o: $(SRCTREE)/common/%.c
	$(HOSTCC) -g $(HOSTCFLAGS_NOPED) -c -o $@ $<

-$(obj)%.o: $(SRCTREE)/lib/%.c
+$(subst lib/,,$(filter lib/%,$(EXT_OBJ_FILES-y))): $(obj)%.o: $(SRCTREE)/lib/%.c
	$(HOSTCC) -g $(HOSTCFLAGS) -c -o $@ $<

-$(obj)%.o: $(SRCTREE)/lib/libfdt/%.c
+$(subst lib/libfdt/,,$(filter lib/libfdt/%,$(LIBFDT_OBJ_FILES-y))): $(obj)%.o: $(SRCTREE)/lib/libfdt/%.c
	$(HOSTCC) -g $(HOSTCFLAGS_NOPED) -c -o $@ $<

subdirs:



More information about the U-Boot mailing list