[Makefile]File + constant problem

Hi guys,
I am writing a Makefile with some strange features.
What I have is:
list of files *.efi
list of guids (guid is just a number)

one *.efi file is supposed to be used with one guid, so efi file and guid is a pair.

What I need is:
list of files *.fv

How to make *.fv file from *.efi file?

 
$(SOME_COMMAND)  efi_file -some_flags   # produces *.efi.xyz file
$(ANOTHER_COMMAND) efi_xyz_file -some_flags guid # produces *.fv file

So $(SOME_COMMAND) and ($ANOTHER_COMMAND) must be done for each of *.efi - guid pair.

E.g

 
files = first.efi second.efi
guid = 544 123
 
#what must be done is:
$(SOME_COMMAND)  first.efi -some_flags   # produces first.efi.xyz file
$(ANOTHER_COMMAND) first.efi.xyz -some_flags 544 # prudces first.fv
 
$(SOME_COMMAND)  second.efi -some_flags   # produces second.efi.xyz file
$(ANOTHER_COMMAND) second.efi.xyz -some_flags 123 # produces second.fv

Do you have any concept how to prepare such a makefile? I tried with for loop but it's not designed to be used inside makefiles...

Are you using Gnu make as that tool is very powerful and features loops...creating pipeline of complex commands etc. so check it out.