fix minor issue and do some cleanup work in genericmake example
authorAndrey Skvortsov <andrej.skvortzov@gmail.com>
Fri, 14 Oct 2016 14:03:38 +0300
changeset 1542 0535a6b50534
parent 1541 9be98ccfed97
child 1543 61f0f31ef296
fix minor issue and do some cleanup work in genericmake example
tests/genericmake/plc.xml
tests/genericmake/project_files/Makefile
--- a/tests/genericmake/plc.xml	Wed Oct 12 17:53:18 2016 +0300
+++ b/tests/genericmake/plc.xml	Fri Oct 14 14:03:38 2016 +0300
@@ -1,7 +1,7 @@
 <?xml version='1.0' encoding='utf-8'?>
 <project xmlns:ns1="http://www.plcopen.org/xml/tc6_0201" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.plcopen.org/xml/tc6_0201">
-  <fileHeader companyName="Unknown" productName="Unnamed" productVersion="1" creationDateTime="2014-01-19T11:14:47"/>
-  <contentHeader name="Unnamed" modificationDateTime="2014-01-20T01:37:01">
+  <fileHeader companyName="Unknown" productName="Unnamed" productVersion="1" creationDateTime="2014-01-19T11:14:47" contentDescription="This example shows how you can customize build process by using 'make'.&#10;"/>
+  <contentHeader name="Makefile Example" modificationDateTime="2016-10-14T14:00:01">
     <coordinateInfo>
       <fbd>
         <scaling x="0" y="0"/>
@@ -35,25 +35,44 @@
         <body>
           <FBD>
             <inVariable localId="1" executionOrderId="0" height="27" width="77" negated="false">
-              <position x="196" y="224"/>
+              <position x="52" y="368"/>
               <connectionPointOut>
                 <relPosition x="77" y="13"/>
               </connectionPointOut>
               <expression>LocalVara</expression>
             </inVariable>
             <outVariable localId="2" executionOrderId="0" height="27" width="77" negated="false">
-              <position x="305" y="227"/>
+              <position x="167" y="368"/>
               <connectionPointIn>
                 <relPosition x="0" y="13"/>
                 <connection refLocalId="1">
-                  <position x="305" y="240"/>
-                  <position x="288" y="240"/>
-                  <position x="288" y="237"/>
-                  <position x="273" y="237"/>
+                  <position x="167" y="381"/>
+                  <position x="129" y="381"/>
                 </connection>
               </connectionPointIn>
               <expression>LocalVarb</expression>
             </outVariable>
+            <comment localId="3" height="310" width="760">
+              <position x="32" y="23"/>
+              <content>
+                <xhtml:p><![CDATA[This example shows how you can customize build process by using 'make'.
+
+Sometimes special steps need to be done to build entire project.
+But it's not necessary to create another target in Beremiz every time you need to customize something in build process.  Just use for that 'Generic' target and describe all necessary steps in Makefile. 
+
+For example, you can 
+ - preprocess generated by Beremiz C source files, 
+ - do some fancy source code transformation using any tools you want, 
+ - use any compiler you want,
+ - call static analyzers,
+ - run integration tests on the project,
+ - upload source code to external build server,
+ - upload to the target and compile it there,
+ - flash/transfer your compiled binary to the target,
+ and much much more.
+]]></xhtml:p>
+              </content>
+            </comment>
           </FBD>
         </body>
       </pou>
--- a/tests/genericmake/project_files/Makefile	Wed Oct 12 17:53:18 2016 +0300
+++ b/tests/genericmake/project_files/Makefile	Fri Oct 14 14:03:38 2016 +0300
@@ -9,5 +9,5 @@
 some_binary: $(BEREMIZ_OBJS)
 	@echo "* Would link $^ -> $@"
 
-%o : %c
+%.o: %.c
 	@echo "* Would compile $< -> $@"