I would like to compile a simple test program in c with an ARM toolchain.
My Makefile is as follows:
CC=/project_path/arm-linux-uclibcgnueabi/bin/gcc
# the compiler: gcc for C program, define as g++ for C++
# compiler flags:
# -g adds debugging information to the executable file
# -Wall turns on most, but not all, compiler warnings
CFLAGS = -g -Wall
# the build target executable:
TARGET = test
all: $(TARGET)
$(TARGET): $(TARGET).c
$(CC) $(CFLAGS) -o $(TARGET) $(TARGET).c
clean:
$(RM) $(TARGET)
The test.c file is a just for compilation test:
#include <stdio.h>
int main(void) {
printf("just for test \n");
return 0;
}
When I execute make, I get the following error:
/project_path/arm-linux-uclibcgnueabi/bin/gcc -g -Wall -o test test.c
gcc: error trying to exec 'cc1': execvp: No such file or directory
Makefile:13: recipe for target 'test' failed
make: *** [test] Error 1
What is wrong with my Makefile?