Error in makefile on Sourcery G++ for coldfire
Pablo Martinez-Crespo
Pablo.Martinez-Crespo at iba-group.com
Fri Jan 16 10:34:26 UTC 2009
Hello *,
I'm trying to compile my first "Hello World" project using Eclipse and
the Codesourcery tool chain. I have configured and installed everything
but I get this error when try to compile:
***multiple target patterns. Stop.
Here is the code of the makefile and the line where the error comes:
########################################################################
######################
# Start of user section
#
# Define project name here
PROJECT = helloFirst
PROJ_DIR = "D:/Tools/HelloFirst"
# Define linker script file here
LDSCRIPT = "C:/Program Files/CodeSourcery/Sourcery
G++/m68k-elf/lib/m5475/m5485evb-ram.ld"
# List all user C define here, like -D_DEBUG=1
UDEFS =
# Define ASM defines here
UADEFS =
# List C source files here
SRC = $(PROJ_DIR)/src/hello.c
# List ASM source files here
#ASRC =
# List all user directories here
UINCDIR = $(PROJ_DIR)/. \
$(PROJ_DIR)/src \
$(PROJ_DIR)/inc
# List the user directory to look for the libraries here
ULIBDIR = "C:/cygwin/lib"
# List all user libraries here
ULIBS = "C:/cygwin/usr/lib"
#ULIBS = -lm
# Define optimisation level here
OPT = -O0
#
# End of user defines
########################################################################
######################
OBJDIR = .obj
INCDIR = $(patsubst %,-I%,$(DINCDIR) $(UINCDIR))
LIBDIR = $(patsubst %,-L%,$(DLIBDIR) $(ULIBDIR))
DEFS = $(DDEFS) $(UDEFS)
ADEFS = $(DADEFS) $(UADEFS)
OBJS = $(patsubst $(PROJ_DIR)/%, $(PROJ_DIR)/$(OBJDIR)/%,
$(ASRC:.s=.o) $(SRC:.c=.o))
LIBS = $(DLIBS) $(ULIBS)
INCDIR += -I"C:/Program Files/CodeSourcery/Sourcery G++
Lite/lib/gcc/m68k-elf/4.2.3/include" \
-I"C:/Program Files/CodeSourcery/Sourcery G++
Lite/m68k-elf/include" \
-I"C:/Program Files/CodeSourcery/Sourcery G++
Lite/m68k-elf/include/sys" \
-I"C:/Program Files/CodeSourcery/Sourcery G++
Lite/m68k-elf/include/machine" \
-I"C:/Program Files/CodeSourcery/Sourcery G++
Lite/lib/gcc/m68k-elf/4.2.3/install-tools/include"
MCFLAGS = -mcpu=548x
ASFLAGS = $(MCFLAGS) -g
-Wa,--register-prefix-optional,-amhls=$(@:.o=.lst) $(ADEFS)
CPFLAGS = $(MCFLAGS) $(OPT) -g -fomit-frame-pointer \
-fno-builtin -ffreestanding -nostdinc \
-Wall -Wstrict-prototypes -fverbose-asm \
-Wa,-ahlms=$(@:.o=.lst) $(DEFS)
LDFLAGS = $(MCFLAGS) -T$(LDSCRIPT) \
-fno-builtin -ffreestanding -nostdinc \
-Wl,-Map=$(PROJECT).map,--cref,--no-warn-mismatch
$(LIBDIR)
# Generate dependency information
CPFLAGS += -MD -MP -MF .dep/$(@F).d
#
# makefile rules
#
.SECONDEXPANSION:
all: $(OBJS) $(PROJECT).elf $(PROJECT).bin # <--------Error comes
here-------<
$(OBJDIR)/%o : %c | $$(@D)/.tmp
$(CC) -c $(CPFLAGS) -I . $(INCDIR) $< -o $@
$(OBJDIR)/%.o : %.s | $$(@D)/.tmp
$(AS) -c $(ASFLAGS) $< -o $@
%elf: $(OBJS)
$(CC) $(OBJS) $(LDFLAGS) $(LIBS) -o $@
%bin: %elf
$(BIN) $< $@
%/.tmp:
-mkdir $(subst /,\,$*)
-touch $@
.PRECIOUS: %/.tmp
Can some one help me with this topic, I don't have any experience with
makefile, I looked already the documentation on the GNU website and many
forums but couldn't find any solution.
Many thanks in advance
Pablo
The contents of this e-mail message and any attachments are intended solely for
the recipient (s) named above. This communication is intended to be and to
remain confidential and may be protected by intellectual property rights. Any
use of the information contained herein (including but not limited to, total or
partial reproduction, communication or distribution of any form) by persons
other than the designated recipient(s) is prohibited. Please notify the sender
immediately by e-mail if you have received this e-mail by mistake and delete
this e-mail from your system. E-mail transmission cannot be guaranteed to be
secure or error-free. Ion Beam Applications does not accept liability for any
such errors. Thank you for your cooperation.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://sourcerytools.com/pipermail/coldfire-gnu-discuss/attachments/20090116/06478029/attachment.html>
More information about the coldfire-gnu-discuss
mailing list