mirror of
https://github.com/Stichting-MINIX-Research-Foundation/u-boot.git
synced 2025-09-16 15:36:22 -04:00
Fix/workaround broken dependency handling with make 3.81
Based on patch by Haavard Skinnemoen, 29 Aug 2006 11:20:39 +0200
This commit is contained in:
parent
ba999c531e
commit
9658298721
@ -59,51 +59,60 @@ endif
|
|||||||
|
|
||||||
include $(TOPDIR)/config.mk
|
include $(TOPDIR)/config.mk
|
||||||
|
|
||||||
|
ELF = hello_world
|
||||||
SREC = hello_world.srec
|
SREC = hello_world.srec
|
||||||
BIN = hello_world.bin hello_world
|
BIN = hello_world.bin
|
||||||
|
|
||||||
ifeq ($(CPU),mpc8xx)
|
ifeq ($(CPU),mpc8xx)
|
||||||
|
ELF = test_burst
|
||||||
SREC = test_burst.srec
|
SREC = test_burst.srec
|
||||||
BIN = test_burst.bin test_burst
|
BIN = test_burst.bin
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(ARCH),i386)
|
ifeq ($(ARCH),i386)
|
||||||
SREC += 82559_eeprom.srec
|
ELF += 82559_eeprom
|
||||||
BIN += 82559_eeprom.bin 82559_eeprom
|
SREC += 82559_eeprom.srec
|
||||||
|
BIN += 82559_eeprom.bin
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(ARCH),ppc)
|
ifeq ($(ARCH),ppc)
|
||||||
SREC += sched.srec
|
ELF += sched
|
||||||
BIN += sched.bin sched
|
SREC += sched.srec
|
||||||
|
BIN += sched.bin
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(ARCH),blackfin)
|
ifeq ($(ARCH),blackfin)
|
||||||
|
ELF += smc91111_eeprom
|
||||||
SREC += smc91111_eeprom.srec
|
SREC += smc91111_eeprom.srec
|
||||||
BIN += smc91111_eeprom.bin smc91111_eeprom
|
BIN += smc91111_eeprom.bin
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# The following example is pretty 8xx specific...
|
# The following example is pretty 8xx specific...
|
||||||
ifeq ($(CPU),mpc8xx)
|
ifeq ($(CPU),mpc8xx)
|
||||||
SREC += timer.srec
|
ELF += timer
|
||||||
BIN += timer.bin timer
|
SREC += timer.srec
|
||||||
|
BIN += timer.bin
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# The following example is 8260 specific...
|
# The following example is 8260 specific...
|
||||||
ifeq ($(CPU),mpc8260)
|
ifeq ($(CPU),mpc8260)
|
||||||
SREC += mem_to_mem_idma2intr.srec
|
ELF += mem_to_mem_idma2intr
|
||||||
BIN += mem_to_mem_idma2intr.bin mem_to_mem_idma2intr
|
SREC += mem_to_mem_idma2intr.srec
|
||||||
|
BIN += mem_to_mem_idma2intr.bin
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Demo for 52xx IRQs
|
# Demo for 52xx IRQs
|
||||||
ifeq ($(CPU),mpc5xxx)
|
ifeq ($(CPU),mpc5xxx)
|
||||||
SREC += interrupt.srec
|
ELF += interrupt
|
||||||
BIN += interrupt.bin interrupt
|
SREC += interrupt.srec
|
||||||
|
BIN += interrupt.bin
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Utility for resetting i82559 EEPROM
|
# Utility for resetting i82559 EEPROM
|
||||||
ifeq ($(BOARD),oxc)
|
ifeq ($(BOARD),oxc)
|
||||||
SREC += eepro100_eeprom.srec
|
ELF += eepro100_eeprom
|
||||||
BIN += eepro100_eeprom.bin eepro100_eeprom
|
SREC += eepro100_eeprom.srec
|
||||||
|
BIN += eepro100_eeprom.bin
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(BIG_ENDIAN),y)
|
ifeq ($(BIG_ENDIAN),y)
|
||||||
@ -126,6 +135,7 @@ LIBOBJS = $(addprefix $(obj),$(LIBAOBJS) $(LIBCOBJS))
|
|||||||
|
|
||||||
SRCS := $(COBJS:.o=.c) $(LIBCOBJS:.o=.c) $(if $(LIBAOBJS),$(LIBAOBJS:.o=.S))
|
SRCS := $(COBJS:.o=.c) $(LIBCOBJS:.o=.c) $(if $(LIBAOBJS),$(LIBAOBJS:.o=.S))
|
||||||
OBJS := $(addprefix $(obj),$(COBJS))
|
OBJS := $(addprefix $(obj),$(COBJS))
|
||||||
|
ELF := $(addprefix $(obj),$(ELF))
|
||||||
BIN := $(addprefix $(obj),$(BIN))
|
BIN := $(addprefix $(obj),$(BIN))
|
||||||
SREC := $(addprefix $(obj),$(SREC))
|
SREC := $(addprefix $(obj),$(SREC))
|
||||||
|
|
||||||
@ -134,19 +144,23 @@ clibdir := $(shell dirname `$(CC) $(CFLAGS) -print-file-name=libc.a`)
|
|||||||
|
|
||||||
CPPFLAGS += -I..
|
CPPFLAGS += -I..
|
||||||
|
|
||||||
all: $(obj).depend $(OBJS) $(LIB) $(SREC) $(BIN)
|
all: $(obj).depend $(OBJS) $(LIB) $(SREC) $(BIN) $(ELF)
|
||||||
|
|
||||||
#########################################################################
|
#########################################################################
|
||||||
$(LIB): $(obj).depend $(LIBOBJS)
|
$(LIB): $(obj).depend $(LIBOBJS)
|
||||||
$(AR) $(ARFLAGS) $@ $(LIBOBJS)
|
$(AR) $(ARFLAGS) $@ $(LIBOBJS)
|
||||||
|
|
||||||
|
$(ELF):
|
||||||
$(obj)%: $(obj)%.o $(LIB)
|
$(obj)%: $(obj)%.o $(LIB)
|
||||||
$(LD) -g $(EX_LDFLAGS) -Ttext $(LOAD_ADDR) \
|
$(LD) -g $(EX_LDFLAGS) -Ttext $(LOAD_ADDR) \
|
||||||
-o $@ -e $(notdir $(<:.o=)) $< $(LIB) \
|
-o $@ -e $(notdir $(<:.o=)) $< $(LIB) \
|
||||||
-L$(gcclibdir) -lgcc
|
-L$(gcclibdir) -lgcc
|
||||||
|
|
||||||
|
$(SREC):
|
||||||
$(obj)%.srec: $(obj)%
|
$(obj)%.srec: $(obj)%
|
||||||
$(OBJCOPY) -O srec $< $@ 2>/dev/null
|
$(OBJCOPY) -O srec $< $@ 2>/dev/null
|
||||||
|
|
||||||
|
$(BIN):
|
||||||
$(obj)%.bin: $(obj)%
|
$(obj)%.bin: $(obj)%
|
||||||
$(OBJCOPY) -O binary $< $@ 2>/dev/null
|
$(OBJCOPY) -O binary $< $@ 2>/dev/null
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user