Mail Archives: djgpp/1999/11/28/12:36:25
On Fri, 26 Nov 1999 21:35:27 GMT, yogin AT polbox DOT com (Pawel Stolowski)
wrote:
>On Thu, 25 Nov 1999 11:32:54 +1000, "Leon" <Leon AT caresystems DOT com DOT au>
>wrote:
>
>>CC = gxx
>>CFLAGS = -g -O2
>>OBJECTS = main.o
>>
>>main.exe : $(OBJECTS)
>> $(CC) $(FLAGS) $(OBJECTS) -o main.exe
>>
>>%.o : %.c
>> $(CC) $(FLAGS) -c $<
>>
>>
>>i am definitely using tabs - still no luck
>>
>>it says no rule blah blah blah - i have taken this example right out of the
>>manual
>
>It's strange. I tried this makefile and it worked for me! Make sure,
>that you have main.c file and makefile in the same directory. Type
>'make' (without parameters).
>I've noticed, that make refuses to do the job depending on the text
>editor I've used. If you got a message saying "missing separator..." it
>is possible, that your editor handles its textfiles in uncommon way
>(assuming it's not your mistake). You may safely use ms-dos/win9x
>"edit". You may also - but I didn't try this - use dtou (dos-to-unix)
>text-converting utility, which comes with djgpp (djdev202.zip to be
>exact).
The editor you use does make a difference. Makefiles require hard
tabs, i.e. an actual tab character (ASCII 9), not two or so blank
spaces. The editor native to Dos, edit.com, replaces tab characters
with a set number of spaces. Moral: don't use edit for
creating/editing makefiles. Personally, I use RHIDE.
--
Chris Mears
- Raw text -