This section provides information about makefile project types and exporting makefiles.
When you create a new project in Eclipse*, there are Executable, Shared Library, Static Library, or Makefile project types available for your selection.
Select Makefile Project if the project already includes a makefile.
Use Executable, Shared Library, or Static Library Project to build a makefile using options assigned from property pages specific to the Intel® oneAPI DPC++/C++ Compiler.
Eclipse can build a makefile that includes Intel® oneAPI DPC++/C++ Compiler options for created Executables, Shared Libraries, or Static Library Projects. When the project is complete, export the makefile and project source files to another directory, and then build the project from the command line using make.
To export the makefile:
In a terminal window, change to the /cpp/hello_world/Release directory, then run make by typing: make clean all.
You should see the following output:
For C++:
rm -rf ./new_source_file.o ./new_source_file.d hello_world Building file: ../new_source_file.c Invoking: Intel C++ Compiler icx -O2 -MMD -MP -MF"new_source_file.d" -MT"new_source_file.d" -c -o "new_source_file.o" "../new_source_file.c" Finished building: ../new_source_file.c Building target: hello_world Invoking: Intel C++ compiler icx -o "hello_world" ./new_source_file.o Finished building target: hello_world
For DPC++:
rm -rf ./new_source_file.o ./new_source_file.d hello_world Building file: ../new_source_file.c Invoking: Intel® oneAPI DPC++ Compiler dpcpp -O2 -MMD -MP -MF"new_source_file.d" -MT"new_source_file.d" -c -o "new_source_file.o" "../new_source_file.c" Finished building: ../new_source_file.c Building target: hello_world Invoking: Linker dpcpp -o "hello_world" ./new_source_file.o Finished building target: hello_world
This process generates the hello_world executable in the same directory.