なぜかリンクできません。環境はXP mingw msysで、環境変数にmingw/binとmingw/includeは通してあります。
エラーメッセージは以下の通りです。

ld -o test.exe test.obj -e _main
test.obj(.text+0x21):test.c: undefined reference to `_alloca'
test.obj(.text+0x26):test.c: undefined reference to `__main'
test.obj(.text+0x32):test.c: undefined reference to `printf'
make: *** [test.exe] Error 1

ソース

#include <stdio.h>
int main(){
 printf("test");
return(0);
}

makefile

make all: test.exe

test.exe: test.obj
 ld -o test.exe test.obj -e _main

test.obj: test.c
 gcc -o test.obj test.c -c