Muliple target patterns (Makefile)

Get help with the installation and running of the Zeus IDE. Please do not post bug reports or feature requests here. When in doubt post your question here.
Post Reply
Gayniux

Muliple target patterns (Makefile)

Post by Gayniux »

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 ?
jussij
Site Admin
Posts: 2650
Joined: Fri Aug 13, 2004 5:10 pm

Post by jussij »

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:

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)
Cheers Jussi
PS: More information regarding make files can be found here.
Gayniux

Post by Gayniux »

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.
-----------------------------------------------------
Gayniux

Post by Gayniux »

My running command for makefile is : make -f $PF all
jussij
Site Admin
Posts: 2650
Joined: Fri Aug 13, 2004 5:10 pm

Post by jussij »

And I always have the problems.

Using the changed make file what does the Zeus output window show as the error message :?:
I use make.exe, given with Zeus package.
The Zeus package does not come with any make.exe utility :?

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

What happens if you run this make command line:

Code: Select all

make -d -f "$pf" All
Most make utilities have a -d debug option designed to help with debugging the making process and the quotes around the $pf will be needed if the project file contains any space characters.

Cheers Jussi
Gayniux

Post by Gayniux »

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.
--------------------------------------
jussij
Site Admin
Posts: 2650
Joined: Fri Aug 13, 2004 5:10 pm

Post by jussij »

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:

Code: Select all

cstartup.r31: $(ASM):/Electronique/Foureuro/Carte_Afficheur/C4/Source_c/BT/cstartup.s31 $(ASMFLAGS) 
actually look like this (ie needs a carriage return):

Code: Select all

cstartup.r31:
$(ASM):/Electronique/Foureuro/Carte_Afficheur/C4/Source_c/BT/cstartup.s31 $(ASMFLAGS) 
Cheers Jussi
Guest

Post by Guest »

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 !!!!
Post Reply