<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Re:Makefile question in Intel® oneAPI DPC++/C++ Compiler</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Makefile-question/m-p/1352453#M1843</link>
    <description>&lt;P&gt;Hi:&lt;/P&gt;
&lt;P&gt;Thanks for your answer, I understand.&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Wed, 19 Jan 2022 01:37:24 GMT</pubDate>
    <dc:creator>liu_wei67</dc:creator>
    <dc:date>2022-01-19T01:37:24Z</dc:date>
    <item>
      <title>Makefile question</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Makefile-question/m-p/1351865#M1834</link>
      <description>&lt;P class="tgt" data-section="0"&gt;&lt;SPAN class="tgt" data-section="0" data-sentence="0" data-group="0-0"&gt;hi:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="tgt" data-section="0"&gt;&lt;SPAN class="tgt" data-section="0" data-sentence="0" data-group="0-0"&gt;In my project, I intend to provide users with a generic Makefile to compile files for them.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="tgt" data-section="1"&gt;&lt;SPAN class="tgt" data-section="1" data-sentence="0" data-group="1-0"&gt;Therefore, I refer to some examples of makefiles provided by Intel official website and makefiles generated in eclipse after integrating dpc++ compiler in eclipse. I find that the same example program compiles slightly different commands. &lt;SPAN&gt;I would like to ask the difference between them and which one is more generic?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="tgt" data-section="2"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="tgt" data-section="3"&gt;&lt;SPAN class="tgt" data-section="3" data-sentence="0" data-group="3-0"&gt;eclipse&amp;nbsp;vector-add Makefile:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="tgt" data-section="4"&gt;&lt;SPAN class="tgt" data-section="4" data-sentence="0" data-group="4-0"&gt;all: main.o&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="tgt" data-section="5"&gt;&lt;SPAN class="tgt" data-section="5" data-sentence="0" data-group="5-0"&gt;dpcpp -L${DPCPP_CMPLR_ROOT}/lib -o main main.o -lsycl -lOpenCL&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="tgt" data-section="6"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="tgt" data-section="7"&gt;&lt;SPAN class="tgt" data-section="7" data-sentence="0" data-group="7-0"&gt;main.o: main.cpp&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="tgt" data-section="8"&gt;&lt;SPAN class="tgt" data-section="8" data-sentence="0" data-group="8-0"&gt;DPCPP -c -i ${DPCPP_CMPLR_ROOT}/include -i ${DPCPP_CMPLR_ROOT}/lib/clang/9.0.0/include -o main.o main.cpp&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="tgt" data-section="9"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="tgt" data-section="10"&gt;&lt;SPAN class="tgt" data-section="10" data-sentence="0" data-group="10-0"&gt;Intel's official website vector-add Makefile:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;CXX = dpcpp&lt;BR /&gt;CXXFLAGS = -O2 -g -std=c++17&lt;/P&gt;
&lt;P&gt;BUFFER_EXE_NAME = vector-add-buffers&lt;BR /&gt;BUFFER_SOURCES = src/vector-add-buffers.cpp&lt;/P&gt;
&lt;P&gt;USM_EXE_NAME = vector-add-usm&lt;BR /&gt;USM_SOURCES = src/vector-add-usm.cpp&lt;/P&gt;
&lt;P&gt;all: build_buffers&lt;/P&gt;
&lt;P&gt;build_buffers:&lt;BR /&gt;$(CXX) $(CXXFLAGS) -o $(BUFFER_EXE_NAME) $(BUFFER_SOURCES)&lt;/P&gt;
&lt;P&gt;build_usm:&lt;BR /&gt;$(CXX) $(CXXFLAGS) -o $(USM_EXE_NAME) $(USM_SOURCES)&lt;/P&gt;
&lt;P&gt;run:&lt;BR /&gt;./$(BUFFER_EXE_NAME)&lt;/P&gt;
&lt;P&gt;run_usm:&lt;BR /&gt;./$(USM_EXE_NAME)&lt;/P&gt;
&lt;P&gt;clean:&lt;BR /&gt;rm -f $(BUFFER_EXE_NAME) $(USM_EXE_NAME)&lt;/P&gt;
&lt;P class="tgt" data-section="35"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="tgt" data-section="35"&gt;thanks&lt;/P&gt;</description>
      <pubDate>Mon, 17 Jan 2022 06:29:44 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Makefile-question/m-p/1351865#M1834</guid>
      <dc:creator>liu_wei67</dc:creator>
      <dc:date>2022-01-17T06:29:44Z</dc:date>
    </item>
    <item>
      <title>Re:Makefile question</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Makefile-question/m-p/1352220#M1839</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thanks for reaching out to us.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Both the eclipse-provided makefile as well as the Intel makefile are supported and you can use any of them to generate the output.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt;I find that the same example program compiles slightly different commands.&lt;/P&gt;&lt;P&gt;Yes, even the output for both the makefiles you are specifying is the same but there is a difference in writing the makefile.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt;I would like to ask the difference between them and which one is more generic?&lt;/P&gt;&lt;P&gt;In this Intel's vector-add makefile there is -O2 flag which optimizes the code.&lt;/P&gt;&lt;P&gt;It is a readable and standard form of writing the Makefile. Here, you can specify the compiler, compilation flags and we can also modify the compiler as well as the compilation options at the run time.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;In this makefile, we will specify the path of the source file, executable and later we can use it for other codes by just changing the filename. And also, the steps to make the makefile are very easy. So, this is a more generic way to use the makefile.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Varsha&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 18 Jan 2022 12:39:27 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Makefile-question/m-p/1352220#M1839</guid>
      <dc:creator>VarshaS_Intel</dc:creator>
      <dc:date>2022-01-18T12:39:27Z</dc:date>
    </item>
    <item>
      <title>Re: Re:Makefile question</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Makefile-question/m-p/1352453#M1843</link>
      <description>&lt;P&gt;Hi:&lt;/P&gt;
&lt;P&gt;Thanks for your answer, I understand.&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jan 2022 01:37:24 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Makefile-question/m-p/1352453#M1843</guid>
      <dc:creator>liu_wei67</dc:creator>
      <dc:date>2022-01-19T01:37:24Z</dc:date>
    </item>
    <item>
      <title>Re:Makefile question</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Makefile-question/m-p/1352512#M1846</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Glad to know that your issue is resolved. If you need any additional information, please post a new question as this thread will no longer be monitored by Intel.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Varsha&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 19 Jan 2022 05:07:03 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-DPC-C-Compiler/Makefile-question/m-p/1352512#M1846</guid>
      <dc:creator>VarshaS_Intel</dc:creator>
      <dc:date>2022-01-19T05:07:03Z</dc:date>
    </item>
  </channel>
</rss>

