here is my makefile:
CC = gcc
CFLAGS =
all: tm
tm: tm.exe
tm.exe: tm.c
$(CC) $(CFLAGS) -otm tm.c
and i got this result:
gcc -otm tm.c
gcc tm.c tm.exe -o tm
tm.exe: file not recognized: File truncated
collect2: ld returned 1 exit status
make: *** [tm] Error 1
why “tm.exe” in “gcc tm.c tm.exe -o tm” comes out????
if i change my makefile into this one:
CC = gcc
CFLAGS =
all: tm.exe
tm.exe: tm.c
$(CC) $(CFLAGS) -otm tm.c
it works well…
thanks previously…
i use gnu make version 3.81 in win7 platform
You didn’t add a rule for making
tmfromtm.exe. However, you don’t actually need to specify the.exeextension on Windows, this will be handled automatically. So just say it like this: