I am getting compilation errors when building my project with a makefile which I don't see when building using console.
I am using the prebuilt GNU toolchain for PowerPC.
Here is my makefile,
GCC_Assembler = powerpc-eabi-as
GCC_Compiler = powerpc-eabi-gcc
Directory_Application :=$(argument)/Source_Files
Directory_Bootloader :=$(argument)/Source_Files
Directory_RAMBootloader :=$(argument)/Source_Files
Application_Source_Files := $(wildcard $(Directory_Application)/*.C)
Application_Source_Files_Objecs=$(Application_Source_Files:.C=.O)
default: Build_Application
all: Build_Application
Build_Application: $(Application_Source_Files_Objecs)
$(Application_Source_Files_Objecs) : %.O: %.C
$(GCC_Compiler) -c $< -o $@ -O1 -Wall -Wfatal-errors
It builds without errors when I try to build it using these commands.
CD %WORKSPACE%\Source Files
powerpc-eabi-gcc debug.c -c -odebug.o -O1 -Wall -Wfatal-errors
powerpc-eabi-gcc io.c -c -oio.o -O1 -Wall -Wfatal-errors
...
...
So, when building using makefile, I get an error for a function that is not declared correctly. See the image below
/Debug.C: infunction 'void display_task_table()':
/Debug.C:627:18: error: 'task_wait' was not declared in this scope
task_wait(100*2);
I only get warning for the same function when compiling without makefile.
Debug.C: in function 'display_task_table':
Debug.c:627:3: warning: implicit declaration of function 'task_wait' [- Wimplicit-function-declaration]
task_wait(100*2);
I can fix the error by including the proper header file, but I would like to know why?
Please let me know if I need to include anything else