Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

whats wrong with my small windows makefile?? totally stuck

redwing26redwing26 Posts: 3Member
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

Comments

  • AsmGuru62AsmGuru62 Posts: 6,519Member
    : 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
    :
    [blue]I have no idea about the makefiles, but you should use better assembler than MASM. If you use FASM - no need for any files, just type:

    fasm [your main asm file name]

    and your EXE is done in one step!

    No OBJ files or any other stuff. You need module programmimg? Just include source files into a main file with include directive:

    include 'Module1.asm'

    and it is all done. And FASM is very fast assembler too. In download package FASM includes skeletons of any possible type of program: Win32, DOS.[/blue]
  • htakeuchihtakeuchi Posts: 19Member
    : 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.
    :

    You did not indent line 9, which is "rc $(fn).res"
  • redwing26redwing26 Posts: 3Member
    Thanks for the help guys problen solved, I am actually using nasm now as opposed to masm but I will ry fasm
Sign In or Register to comment.