Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

seperator error in windows .mak file

Status
Not open for further replies.

redwing26

Programmer
Feb 16, 2006
21
GB
Hi I am reading a book called windows assembly language and systems programming (a very good book at that), the thing is im trying to learn how to do windows make files and the example is like so:

[file skeleton.mak]


fn = skeleton
all:$(fn) .exe
$(fn).obj : $(fn).asm
masm $(fn);
$(fn).res : $(fn).r c
rc -r $(fn).rc
$(fn).exe : $(fn) .obj $(fn) .def $(fn) .res
link $(fn) /NOD, , , libw , $(fn).def
rc $(fn).res

and I get a SKELETON.mak(9) : fatal error U1034: syntax error : separator missing
Stop.

I have googled this but It said something about putting a colon in between targets and dependants , this wasnt very helpful as im just new to makefiles .......it looks like perl syntax , im not sure but perl or the alike languages are ones i have never studied.......anyway any way to fix this would really help.

I have files
skeleton.aps .asm .def .rc .mak
 
First is this line# 9?:
$(fn).res : $(fn).r c
if so, you have a space between r and c which will confuse the program.

My documentation for MAKE says that the proper syntax is this:
Target1: Dependency1 dependency2... dependencyN
rule

so in your case, It should look something like this:
Code:
  fn=Skeleton

  Skeleton.exe: $(fn).obj $(fn)res $(fn)def
    link $(fn) /NOD, , , libw , $(fn).def
  $(fn).obj: $(fn).asm
    masm $(fn)
  $(fn).res: $(fn).rc
    rc -r $(fn).rc
I am working with borland's flavor of make, but it should be fairly standard across the board. Essentially, you start with the last step first and work inwards.

The simplest solution is the best!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top