• Welcome to Autism Forums, a friendly forum to discuss Aspergers Syndrome, Autism, High Functioning Autism and related conditions.

    Your voice is missing! You will need to register to get access to the following site features:
    • Reply to discussions and create your own threads.
    • Our modern chat room. No add-ons or extensions required, just login and start chatting!
    • Private Member only forums for more serious discussions that you may wish to not have guests or search engines access to.
    • Your very own blog. Write about anything you like on your own individual blog.

    We hope to see you as a part of our community soon! Please also check us out @ https://www.twitter.com/aspiescentral

I don't understand this make error :/

GoofKing

All your bases are belong to us
I did everything this site on setting up gbdk (Gameboy development Kit) on Linux and it all went smoothly until I got to the make-file part.

Here's what it contains:

Code:
CC    = ../../../bin/lcc -Wa-l -Wl-m

BINS    = test01.gb

all:    $(BINS)

%.o:    %.c
    $(CC) -c -o $@ $<

%.s:    %.c
    $(CC) -S -o $@ $<

%.o:    %.s
    $(CC) -c -o $@ $<

%.gb:    %.o
    $(CC) -o $@ $<

clean:
    rm -f *.o *.lst *.map *.gb

# Link file, and write 0x80 at position 0x143 in header
test01.gb:    test01.o
    $(CC) -Wl-yp0x143=0x80 -o test01.gb test01.o

but when I type make it gives this error:

Code:
makefile:8: *** missing separator (did you mean TAB instead of 8 spaces?).  Stop.

...

At first I had trouble with the site and deciding rather or not there were spaces in the make-file but then had the common sense to just copy it completely from the site here,MariusGames - Making Gameboy games: installing the GBDK compiler in Ubuntu Linux

and it's still giving me errors. Why the hell does it matter if an effing tab instead of eight spaces and why does it even matter in the first place ?

What does it even mean ?
 
As you've found out, makefiles are weird and fussy.
They need tabs, and you can't substitute spaces for them.
 
As you've found out, makefiles are weird and fussy.
They need tabs, and you can't substitute spaces for them.

And why are make files fussy like this ? It just seems unnecessary :/ I opened the file with Gedit and replaced the spaces with tabs by backspacing everything and tabbing them instead, now I got this error:

Code:
../../../bin/lcc-Wa-l-Wl-m -c -o test01.o test01.c
make: ../../../bin/lcc-Wa-l-Wl-m: Command not found
makefile:8: recipe for target 'test01.o' failed
make: *** [test01.o] Error 127

and wonder what I've done to piss of the almighty Linux make command :/
 
And you are dealing with very old libraries and the old CC compiler.
I had a look... gdbk stopped updating in 2001.

Sounds like a fun little adventure anyway. I hope you succeed in making something.
 
And you are dealing with very old libraries and the old CC compiler.
I had a look... gdbk stopped updating in 2001.

Sounds like a fun little adventure anyway. I hope you succeed in making something.

Well, if I've given up on Linux, I'd be with the Unix haters and with the author of the Unix haters guide :p I must admit that learning from Linux is rewarding if you could swallow the frustrations and keep trying. Believe me, I've been to the point of giving up but still had stuck with Debian :D
 
And why are make files fussy like this ? It just seems unnecessary :/ I opened the file with Gedit and replaced the spaces with tabs by backspacing everything and tabbing them instead, now I got this error:

Code:
../../../bin/lcc-Wa-l-Wl-m -c -o test01.o test01.c
make: ../../../bin/lcc-Wa-l-Wl-m: Command not found
makefile:8: recipe for target 'test01.o' failed
make: *** [test01.o] Error 127
and wonder what I've done to piss of the almighty Linux make command :/


Woah, don't replace ALL spaces with Tabs. Just do the indenting with them.
"lcc-Wa-l-Wl-m: Command not found" <--- remove the tabs and put in spaces.
Alternatively, do you have "lcc" installed on your machine?
 
Hmmm... where did you get the library? I saw that lcc is part of the whole package. I have no idea how you install it.
 

New Threads

Top Bottom