3

I have never made a makefile before, but we have been handed this one but, if I try to run it, it just says,

missing separator. stop.

I don't know what could be wrong - and I have made sure that the spaces are made be pressing only tab.

 #Rule for linking
 randomNumbers: randomNumbers.o randomNumbers_functions.o
    cc -o randomNumbers randomNumbers.o randomNumbers_function.o

 # Rule for generating object code myprogram.o
 randomNumbers.o: randomNumbers.c myheader.h
    cc -c randomNumbers.c -std=c99 -Wall

 # Rule for generating object code routine1.o
 randomNumbers_functions.o: randomNumbers_functions.c
    cc -c randomNumbers_functions.c -std=c99 -Wall

I'm not quite sure what a hex a dump is but I found a webpage that can do it, so I think this is it:

0000-0010:  ef bf bc ef-bf bc 20 23-52 75 6c 65-20 66 6f 72  .......# Rule.for
0000-0020:  20 6c 69 6e-6b 69 6e 67-0a 72 61 6e-64 6f 6d 4e  .linking .randomN
0000-0030:  75 6d 62 65-72 73 3a 20-72 61 6e 64-6f 6d 4e 75  umbers:. randomNu
0000-0040:  6d 62 65 72-73 2e 6f 20-72 61 6e 64-6f 6d 4e 75  mbers.o. randomNu
[...]
Jens
  • 69,818
  • 15
  • 125
  • 179
some_name
  • 389
  • 3
  • 17

1 Answers1

3

You've got some funny bytes at the start of your Makefile:

 ef bf bc ef bf bc

Unicode? Byte-order marks? Something else funny?

Remove these bytes/characters and your Makefile should work.

Jens
  • 69,818
  • 15
  • 125
  • 179