1 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
  2 <!--Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved.
  3 DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  4 
  5 This code is free software; you can redistribute it and/or modify it
  6 under the terms of the GNU General Public License version 2 only, as
  7 published by the Free Software Foundation.  Oracle designates this
  8 particular file as subject to the "Classpath" exception as provided
  9 by Oracle in the LICENSE file that accompanied this code.
 10 
 11 This code is distributed in the hope that it will be useful, but WITHOUT
 12 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 13 FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 14 version 2 for more details (a copy is included in the LICENSE file that
 15 accompanied this code).
 16 
 17 You should have received a copy of the GNU General Public License version
 18 2 along with this work; if not, write to the Free Software Foundation,
 19 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
 20 
 21 Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
 22 or visit www.oracle.com if you need additional information or have any
 23 questions.
 24 --><project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0">
 25     <!--Auto generated by mkpoms-->
 26     <modelVersion>4.0.0</modelVersion>
 27     <!--<packaging>pom</packaging>-->
 28     <!-- we want to create a jar -->
 29     <groupId>oracle.code</groupId>
 30     <artifactId>hat-jextracted-opencl</artifactId>
 31     <version>1.0</version>
 32     <parent>
 33         <groupId>oracle.code</groupId>
 34         <artifactId>hat-extractions</artifactId>
 35         <version>1.0</version>
 36     </parent>
 37     <build>
 38         <plugins>
 39             <plugin>
 40                 <groupId>org.apache.maven.plugins</groupId>
 41                 <artifactId>maven-antrun-plugin</artifactId>
 42                 <version>1.8</version>
 43                 <executions>
 44                     <execution>
 45                         <id>createDirAndMacCompileFlags</id>
 46                         <phase>initialize</phase>
 47                         <goals>
 48                             <goal>run</goal>
 49                         </goals> 
 50                         <configuration>
 51                             <target>
 52                                 <mkdir dir="${hat.stage.jextract}"/>
 53                                 <echo file="${hat.stage.jextract}/compile_flags.txt" message="-F${mac.app.frameworks}"/>
 54                             </target>
 55                         </configuration>
 56                     </execution>
 57                     <execution>
 58                         <id>copyJarToBuild</id>
 59                         <phase>install</phase>
 60                         <goals>
 61                             <goal>run</goal>
 62                         </goals>
 63                         <configuration>
 64                             <target>
 65                                 <jar basedir="${hat.stage.jextract}" destfile="${hat.build}/${project.artifactId}-${project.version}.jar" includes="opencl/**"/>
 66                             </target>
 67                         </configuration>
 68                     </execution>
 69                 </executions>
 70             </plugin>
 71 
 72             <plugin>
 73                 <groupId>org.codehaus.mojo</groupId>
 74                 <artifactId>exec-maven-plugin</artifactId>
 75                 <version>3.1.0</version>
 76                 <executions>
 77                     <execution>
 78                         <id>runJextractOnOpenCL</id>
 79                         <phase>generate-sources</phase>
 80                         <goals>
 81                             <goal>exec</goal>
 82                         </goals>
 83                         <configuration>
 84                             <executable>jextract</executable>
 85                             <workingDirectory>${hat.stage.jextract}</workingDirectory>
 86                             <arguments>
 87                                 <argument>--output</argument>
 88                                 <argument>${hat.stage.jextract}</argument>
 89                                 <argument>-t</argument>
 90                                 <argument>opencl</argument>
 91                                 <argument>-l</argument>
 92                                 <argument>${mac.lib.frameworks}/OpenCL.framework/OpenCL</argument>
 93                                 <argument>${mac.app.frameworks}/OpenCL.framework/Headers/opencl.h</argument>
 94                             </arguments>
 95                         </configuration>
 96                     </execution>
 97                 </executions>
 98             </plugin>
 99         </plugins>
100     </build>
101 </project>