Muliple target patterns (Makefile)
Muliple target patterns (Makefile)
Have a problem with my project makefile. Have this message when I compile project :
L:\Electronique\Foureuro\Carte_Afficheur\C4\Source_c\BT\Makefile.win:164: *** multiple target patterns. Stop.
My make file :
-----------------------------------------------------------------------
# Project: Test
# Makefile created by moi
CPP = "C:/appl/IAR Systems/ew23/740/bin/icc740.exe"
CC = "C:/appl/IAR Systems/ew23/740/bin/icc740.exe"
LNK = "C:/appl/IAR Systems/ew23/740/bin/xlink.exe"
ASM = "C:/appl/IAR Systems/ew23/740/bin/a740.exe"
WINDRES = windres.exe
RES =
OBJ = var_glo.r31 cstartup.r31 $(RES)
LNKOBJ = var_glo cstartup $(RES)
LIBS = -I"C:/appl/IAR Systems/ew23/740/lib"
INCS = -I"L:/Electronique/Foureuro/Carte_Afficheur/C4/Source_c/BT" -I"C:/appl/IAR Systems/ew23/740/inc"
BIN = rom.hex $(RES)
CFLAGS = $(INCS) -DEURO_145x26 -DM37560 -DEURO_C4 -DAFFICHEUR -DEURO_C4_145x26 -v0 -mt -e -K -gAO -z9 -RCODE -r0
ASMFLAGS = $(INCS)
LNKFLAGS = $(LIBS) -Hff -f "L:/Electronique/Foureuro/Carte_Afficheur/C4/Source_c/BT/rom.xcl"
all: $(OBJ)
link: $(BIN)
cstartup.r31:
$(ASM) L:/Electronique/Foureuro/Carte_Afficheur/C4/Source_c/BT/cstartup.s31 $(ASMFLAGS)
var_glo.r31: L:/Electronique/Foureuro/Carte_Afficheur/C4/Source_c/BT/var_glo.c
$(CC) L:/Electronique/Foureuro/Carte_Afficheur/C4/Source_c/BT/var_glo.c $(CFLAGS)
rom.hex:
$(LNK) $(LNKFLAGS) $(LNKOBJ)
-----------------------------------------------------------------------
If I "kill" option LIBS, it's okay .... What's the problem ?
L:\Electronique\Foureuro\Carte_Afficheur\C4\Source_c\BT\Makefile.win:164: *** multiple target patterns. Stop.
My make file :
-----------------------------------------------------------------------
# Project: Test
# Makefile created by moi
CPP = "C:/appl/IAR Systems/ew23/740/bin/icc740.exe"
CC = "C:/appl/IAR Systems/ew23/740/bin/icc740.exe"
LNK = "C:/appl/IAR Systems/ew23/740/bin/xlink.exe"
ASM = "C:/appl/IAR Systems/ew23/740/bin/a740.exe"
WINDRES = windres.exe
RES =
OBJ = var_glo.r31 cstartup.r31 $(RES)
LNKOBJ = var_glo cstartup $(RES)
LIBS = -I"C:/appl/IAR Systems/ew23/740/lib"
INCS = -I"L:/Electronique/Foureuro/Carte_Afficheur/C4/Source_c/BT" -I"C:/appl/IAR Systems/ew23/740/inc"
BIN = rom.hex $(RES)
CFLAGS = $(INCS) -DEURO_145x26 -DM37560 -DEURO_C4 -DAFFICHEUR -DEURO_C4_145x26 -v0 -mt -e -K -gAO -z9 -RCODE -r0
ASMFLAGS = $(INCS)
LNKFLAGS = $(LIBS) -Hff -f "L:/Electronique/Foureuro/Carte_Afficheur/C4/Source_c/BT/rom.xcl"
all: $(OBJ)
link: $(BIN)
cstartup.r31:
$(ASM) L:/Electronique/Foureuro/Carte_Afficheur/C4/Source_c/BT/cstartup.s31 $(ASMFLAGS)
var_glo.r31: L:/Electronique/Foureuro/Carte_Afficheur/C4/Source_c/BT/var_glo.c
$(CC) L:/Electronique/Foureuro/Carte_Afficheur/C4/Source_c/BT/var_glo.c $(CFLAGS)
rom.hex:
$(LNK) $(LNKFLAGS) $(LNKOBJ)
-----------------------------------------------------------------------
If I "kill" option LIBS, it's okay .... What's the problem ?
I am not sure which make utility you are using, but based on the error message, I would guess the maker is unsure as to which is the main target for the make file (ie it has more than one main target so it does not know where to start).
So assuming the main target is in fact rom.hex (ie the thing that is the output of the make process) I would try re-structuring the make file rules as shown below:
Cheers Jussi
PS: More information regarding make files can be found here.
So assuming the main target is in fact rom.hex (ie the thing that is the output of the make process) I would try re-structuring the make file rules as shown below:
Code: Select all
# rom.hex depends on cstartup.r31 and var_glo.r31
rom.hex: cstartup.r31 var_glo.r31
$(LNK) $(LNKFLAGS) $(LNKOBJ)
cstartup.r31:
$(ASM) L:/Electronique/Foureuro/Carte_Afficheur/C4/Source_c/BT/cstartup.s31 $(ASMFLAGS)
var_glo.r31: L:/Electronique/Foureuro/Carte_Afficheur/C4/Source_c/BT/var_glo.c
$(CC) L:/Electronique/Foureuro/Carte_Afficheur/C4/Source_c/BT/var_glo.c $(CFLAGS)
PS: More information regarding make files can be found here.
So, I have modified my makefile :
------------------------------------
# Project: Test
# Makefile created by moi
CPP = "C:/appl/IAR Systems/ew23/740/bin/icc740.exe"
CC = "C:/appl/IAR Systems/ew23/740/bin/icc740.exe"
LNK = "C:/appl/IAR Systems/ew23/740/bin/xlink.exe"
ASM = "C:/appl/IAR Systems/ew23/740/bin/a740.exe"
WINDRES = windres.exe
RES =
OBJ = var_glo.r31 cstartup.r31 $(RES)
LNKOBJ = var_glo cstartup $(RES)
LIBS = -I"C:/appl/IAR Systems/ew23/740/lib"
INCS = -I"L:/Electronique/Foureuro/Carte_Afficheur/C4/Source_c/BT" -I"C:/appl/IAR Systems/ew23/740/inc"
BIN = rom.hex $(RES)
CFLAGS = $(INCS) -DEURO_145x26 -DM37560 -DEURO_C4 -DAFFICHEUR -DEURO_C4_145x26 -v0 -mt -e -K -gAO -z9 -RCODE -r0
ASMFLAGS = $(INCS)
LNKFLAGS = $(LIBS) -Hff -f "L:/Electronique/Foureuro/Carte_Afficheur/C4/Source_c/BT/rom.xcl"
all: $(OBJ)
$(LNK) $(LNKFLAGS) $(LNKOBJ)
cstartup.r31:
$(ASM) L:/Electronique/Foureuro/Carte_Afficheur/C4/Source_c/BT/cstartup.s31 $(ASMFLAGS)
var_glo.r31: L:/Electronique/Foureuro/Carte_Afficheur/C4/Source_c/BT/var_glo.c
$(CC) L:/Electronique/Foureuro/Carte_Afficheur/C4/Source_c/BT/var_glo.c $(CFLAGS)
----------------------------------------------
And I always have the problems. I use make.exe, given with Zeus package.
-----------------------------------------------------
------------------------------------
# Project: Test
# Makefile created by moi
CPP = "C:/appl/IAR Systems/ew23/740/bin/icc740.exe"
CC = "C:/appl/IAR Systems/ew23/740/bin/icc740.exe"
LNK = "C:/appl/IAR Systems/ew23/740/bin/xlink.exe"
ASM = "C:/appl/IAR Systems/ew23/740/bin/a740.exe"
WINDRES = windres.exe
RES =
OBJ = var_glo.r31 cstartup.r31 $(RES)
LNKOBJ = var_glo cstartup $(RES)
LIBS = -I"C:/appl/IAR Systems/ew23/740/lib"
INCS = -I"L:/Electronique/Foureuro/Carte_Afficheur/C4/Source_c/BT" -I"C:/appl/IAR Systems/ew23/740/inc"
BIN = rom.hex $(RES)
CFLAGS = $(INCS) -DEURO_145x26 -DM37560 -DEURO_C4 -DAFFICHEUR -DEURO_C4_145x26 -v0 -mt -e -K -gAO -z9 -RCODE -r0
ASMFLAGS = $(INCS)
LNKFLAGS = $(LIBS) -Hff -f "L:/Electronique/Foureuro/Carte_Afficheur/C4/Source_c/BT/rom.xcl"
all: $(OBJ)
$(LNK) $(LNKFLAGS) $(LNKOBJ)
cstartup.r31:
$(ASM) L:/Electronique/Foureuro/Carte_Afficheur/C4/Source_c/BT/cstartup.s31 $(ASMFLAGS)
var_glo.r31: L:/Electronique/Foureuro/Carte_Afficheur/C4/Source_c/BT/var_glo.c
$(CC) L:/Electronique/Foureuro/Carte_Afficheur/C4/Source_c/BT/var_glo.c $(CFLAGS)
----------------------------------------------
And I always have the problems. I use make.exe, given with Zeus package.
-----------------------------------------------------
And I always have the problems.
Using the changed make file what does the Zeus output window show as the error message

The Zeus package does not come with any make.exe utilityI use make.exe, given with Zeus package.

I would say your machine already had some other make.exe utility installed

What happens if you run this make command line:
Code: Select all
make -d -f "$pf" All
Cheers Jussi
With -d option, I have this output window :
--------------------------------------
---------------------------------------------------------------------------
Zeus for Windows Programmers Editor - Version 3.95s
Copyright (c) Xidicone Pty Ltd 1993-2005. All rights reserved.
---------------------------------------------------------------------------
**** Unregistered Software. To be used for evaluation purposes only. ****
---------------------------------------------------------------------------
--------------------Configuration: Test - Debug--------------------
GNU Make version 3.79.1, by Richard Stallman and Roland McGrath.
Built for i686-pc-cygwin
Copyright (C) 1988, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000
Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Report bugs to <bug-make@gnu.org>.
Reading makefiles...
Reading makefile `L:\Electronique\Foureuro\Carte_Afficheur\C4\Source_c\BT\Makefile.win'...
L:\Electronique\Foureuro\Carte_Afficheur\C4\Source_c\BT\Makefile.win:20: *** multiple target patterns. Stop.
--------------------------------------
--------------------------------------
---------------------------------------------------------------------------
Zeus for Windows Programmers Editor - Version 3.95s
Copyright (c) Xidicone Pty Ltd 1993-2005. All rights reserved.
---------------------------------------------------------------------------
**** Unregistered Software. To be used for evaluation purposes only. ****
---------------------------------------------------------------------------
--------------------Configuration: Test - Debug--------------------
GNU Make version 3.79.1, by Richard Stallman and Roland McGrath.
Built for i686-pc-cygwin
Copyright (C) 1988, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000
Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Report bugs to <bug-make@gnu.org>.
Reading makefiles...
Reading makefile `L:\Electronique\Foureuro\Carte_Afficheur\C4\Source_c\BT\Makefile.win'...
L:\Electronique\Foureuro\Carte_Afficheur\C4\Source_c\BT\Makefile.win:20: *** multiple target patterns. Stop.
--------------------------------------
I did a google search for the error message and based on the information found at this link and this link it looks like the problem relates to a stray semi colon in make your file rules.
Based on these information from these links you have to ensure that the make file rules like this one:
actually look like this (ie needs a carriage return):
Cheers Jussi
Based on these information from these links you have to ensure that the make file rules like this one:
Code: Select all
cstartup.r31: $(ASM):/Electronique/Foureuro/Carte_Afficheur/C4/Source_c/BT/cstartup.s31 $(ASMFLAGS)
Code: Select all
cstartup.r31:
$(ASM):/Electronique/Foureuro/Carte_Afficheur/C4/Source_c/BT/cstartup.s31 $(ASMFLAGS)
So, I have modified my makefile :
------------------------------------
# Project: Test
# Makefile created by moi
CPP = "C:/appl/IAR Systems/ew23/740/bin/icc740.exe"
CC = "C:/appl/IAR Systems/ew23/740/bin/icc740.exe"
LNK = "C:/appl/IAR Systems/ew23/740/bin/xlink.exe"
ASM = "C:/appl/IAR Systems/ew23/740/bin/a740.exe"
WINDRES = windres.exe
RES =
OBJ = var_glo.r31 cstartup.r31 $(RES)
LNKOBJ = var_glo cstartup $(RES)
LIBS = -I"C:/appl/IAR Systems/ew23/740/lib"
INCS = -I"L:/Electronique/Foureuro/Carte_Afficheur/C4/Source_c/BT" -I"C:/appl/IAR Systems/ew23/740/inc"
BIN = rom.hex $(RES)
CFLAGS = $(INCS) -DEURO_145x26 -DM37560 -DEURO_C4 -DAFFICHEUR -DEURO_C4_145x26 -v0 -mt -e -K -gAO -z9 -RCODE -r0
ASMFLAGS = $(INCS)
LNKFLAGS = $(LIBS) -Hff -f "L:/Electronique/Foureuro/Carte_Afficheur/C4/Source_c/BT/rom.xcl"
all:
$(OBJ)
link:
$(LNK) $(LNKFLAGS) $(LNKOBJ)
cstartup.r31:
$(ASM) L:/Electronique/Foureuro/Carte_Afficheur/C4/Source_c/BT/cstartup.s31 $(ASMFLAGS)
var_glo.r31:
L:/Electronique/Foureuro/Carte_Afficheur/C4/Source_c/BT/var_glo.c $(CFLAGS)
----------------------------------------------
And now, I have this message :
--------------------Configuration: Test - Debug--------------------
GNU Make version 3.79.1, by Richard Stallman and Roland McGrath.
Built for i686-pc-cygwin
Copyright (C) 1988, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000
Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Report bugs to <bug-make@gnu.org>.
Reading makefiles...
Reading makefile `L:\Electronique\Foureuro\Carte_Afficheur\C4\Source_c\BT\Makefile.win'...
L:\Electronique\Foureuro\Carte_Afficheur\C4\Source_c\BT\Makefile.win:19: *** missing separator. Stop.
----------------------------------------------
and line 19 is "$(OBJ)" under the target "all:"
ARRRRGGGH !!! too much complicated !!!!
------------------------------------
# Project: Test
# Makefile created by moi
CPP = "C:/appl/IAR Systems/ew23/740/bin/icc740.exe"
CC = "C:/appl/IAR Systems/ew23/740/bin/icc740.exe"
LNK = "C:/appl/IAR Systems/ew23/740/bin/xlink.exe"
ASM = "C:/appl/IAR Systems/ew23/740/bin/a740.exe"
WINDRES = windres.exe
RES =
OBJ = var_glo.r31 cstartup.r31 $(RES)
LNKOBJ = var_glo cstartup $(RES)
LIBS = -I"C:/appl/IAR Systems/ew23/740/lib"
INCS = -I"L:/Electronique/Foureuro/Carte_Afficheur/C4/Source_c/BT" -I"C:/appl/IAR Systems/ew23/740/inc"
BIN = rom.hex $(RES)
CFLAGS = $(INCS) -DEURO_145x26 -DM37560 -DEURO_C4 -DAFFICHEUR -DEURO_C4_145x26 -v0 -mt -e -K -gAO -z9 -RCODE -r0
ASMFLAGS = $(INCS)
LNKFLAGS = $(LIBS) -Hff -f "L:/Electronique/Foureuro/Carte_Afficheur/C4/Source_c/BT/rom.xcl"
all:
$(OBJ)
link:
$(LNK) $(LNKFLAGS) $(LNKOBJ)
cstartup.r31:
$(ASM) L:/Electronique/Foureuro/Carte_Afficheur/C4/Source_c/BT/cstartup.s31 $(ASMFLAGS)
var_glo.r31:
L:/Electronique/Foureuro/Carte_Afficheur/C4/Source_c/BT/var_glo.c $(CFLAGS)
----------------------------------------------
And now, I have this message :
--------------------Configuration: Test - Debug--------------------
GNU Make version 3.79.1, by Richard Stallman and Roland McGrath.
Built for i686-pc-cygwin
Copyright (C) 1988, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000
Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Report bugs to <bug-make@gnu.org>.
Reading makefiles...
Reading makefile `L:\Electronique\Foureuro\Carte_Afficheur\C4\Source_c\BT\Makefile.win'...
L:\Electronique\Foureuro\Carte_Afficheur\C4\Source_c\BT\Makefile.win:19: *** missing separator. Stop.
----------------------------------------------
and line 19 is "$(OBJ)" under the target "all:"
ARRRRGGGH !!! too much complicated !!!!