Skip to content

Commit

Permalink
When explicitly generating native header, avoid implicit referenced c…
Browse files Browse the repository at this point in the history
…lasses.

Thanks to Phil Jordan, who is debating certain build issues of JOGL with me,
we figured that certain generated header files ended up in the wrong build folder.
E.g. on GNU/Linux, jogamp_nativewindow_windows_GDI.h ended up in build-x86_64/nativewindow/gensrc/native/drm/

This happens due to the new java11 way of generating header files using javac.
Per default, all referenced files are being compiled and header files were generated
in this case for all of them using the given '-h location' argument.
Since nativewindow generates headers for the new drm functionality first (where available),
all headers of all included referenced classes ended up in this drm build location.
Subsequent javac was skipped 'thanks' to the already existing class files ;-)

This patch disables implicit class file creation when explicitly generating headers only
using the javac argument '-implicit:none'.

This is done for the whole JOGL project (nativewindow, jogl and newt).
Other JogAmp modules should not be concerned due to the lack of overspecific
platform parts ..
  • Loading branch information
sgothel committed Feb 2, 2020
1 parent 8e5dae7 commit 77ae1b7
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
3 changes: 3 additions & 0 deletions make/build-jogl.xml
Expand Up @@ -1094,6 +1094,7 @@
<classpath refid="nativewindow_gluegen.classpath"/>
<include name="jogamp/opengl/GLDebugMessageHandler.java" />
<include name="jogamp/opengl/GLContextImpl.java" />
<compilerarg value="-implicit:none" />
</javac>

<!-- generate libav native headers -->
Expand All @@ -1114,6 +1115,7 @@
<include name="jogamp/opengl/util/av/impl/FFMPEGv09Natives.java" />
<include name="jogamp/opengl/util/av/impl/FFMPEGv10Natives.java" />
<include name="jogamp/opengl/util/av/impl/FFMPEGv11Natives.java" />
<compilerarg value="-implicit:none" />
</javac>

<!-- generate openmax native headers -->
Expand All @@ -1130,6 +1132,7 @@
debug="${javacdebug}" debuglevel="${javacdebuglevel}">
<classpath refid="nativewindow_gluegen.classpath"/>
<include name="jogamp/opengl/util/av/impl/OMXGLMediaPlayer.java" />
<compilerarg value="-implicit:none" />
</javac>

<!-- Perform the first pass Java compile. -->
Expand Down
5 changes: 5 additions & 0 deletions make/build-nativewindow.xml
Expand Up @@ -355,6 +355,7 @@
<classpath refid="swt_gluegen.classpath"/>
<include name="jogamp/nativewindow/drm/DRMLib.java" />
<include name="jogamp/nativewindow/drm/DRMUtil.java" />
<compilerarg value="-implicit:none" />
</javac>
</target>
<target name="javah.x11" if="isX11">
Expand All @@ -373,6 +374,7 @@
<classpath refid="swt_gluegen.classpath"/>
<include name="jogamp/nativewindow/x11/X11Lib.java" />
<include name="jogamp/nativewindow/x11/X11Util.java" />
<compilerarg value="-implicit:none" />
</javac>
</target>
<target name="javah.windows" if="isWindows">
Expand All @@ -391,6 +393,7 @@
<classpath refid="swt_gluegen.classpath"/>
<include name="jogamp/nativewindow/windows/GDI.java" />
<include name="jogamp/nativewindow/windows/GDIUtil.java" />
<compilerarg value="-implicit:none" />
</javac>
</target>
<target name="javah.macos" if="isOSX">
Expand All @@ -409,6 +412,7 @@
<classpath refid="swt_gluegen.classpath"/>
<include name="jogamp/nativewindow/jawt/macosx/MacOSXJAWTWindow.java" />
<include name="jogamp/nativewindow/macosx/OSXUtil.java" />
<compilerarg value="-implicit:none" />
</javac>
</target>
<target name="javah.ios" if="isIOS">
Expand All @@ -426,6 +430,7 @@
debug="${javacdebug}" debuglevel="${javacdebuglevel}">
<classpath refid="swt_gluegen.classpath"/>
<include name="jogamp/nativewindow/ios/IOSUtil.java" />
<compilerarg value="-implicit:none" />
</javac>
</target>

Expand Down
10 changes: 10 additions & 0 deletions make/build-newt.xml
Expand Up @@ -265,6 +265,7 @@
debug="${javacdebug}" debuglevel="${javacdebuglevel}">
<classpath refid="jogl_nativewindow_gluegen.classpath"/>
<include name="jogamp/newt/driver/kd/WindowDriver.java" />
<compilerarg value="-implicit:none" />
</javac>

<!-- create Intel GDL native headers -->
Expand All @@ -284,6 +285,7 @@
<include name="jogamp/newt/driver/intel/gdl/DisplayDriver.java" />
<include name="jogamp/newt/driver/intel/gdl/ScreenDriver.java" />
<include name="jogamp/newt/driver/intel/gdl/WindowDriver.java" />
<compilerarg value="-implicit:none" />
</javac>

<!-- create Broadcom EGL native headers -->
Expand All @@ -301,6 +303,7 @@
debug="${javacdebug}" debuglevel="${javacdebuglevel}">
<classpath refid="jogl_nativewindow_gluegen.classpath"/>
<include name="jogamp/newt/driver/bcm/egl/WindowDriver.java" />
<compilerarg value="-implicit:none" />
</javac>

<!-- create Broadcom VideoCore IV native headers -->
Expand All @@ -320,6 +323,7 @@
<include name="jogamp/newt/driver/bcm/vc/iv/DisplayDriver.java" />
<include name="jogamp/newt/driver/bcm/vc/iv/ScreenDriver.java" />
<include name="jogamp/newt/driver/bcm/vc/iv/WindowDriver.java" />
<compilerarg value="-implicit:none" />
</javac>

<!-- create EGL GBM native headers -->
Expand All @@ -339,6 +343,7 @@
<include name="jogamp/newt/driver/egl/gbm/DisplayDriver.java" />
<include name="jogamp/newt/driver/egl/gbm/ScreenDriver.java" />
<include name="jogamp/newt/driver/egl/gbm/WindowDriver.java" />
<compilerarg value="-implicit:none" />
</javac>

<!-- create Windows native headers -->
Expand All @@ -358,6 +363,7 @@
<include name="jogamp/newt/driver/windows/WindowDriver.java" />
<include name="jogamp/newt/driver/windows/ScreenDriver.java" />
<include name="jogamp/newt/driver/windows/DisplayDriver.java" />
<compilerarg value="-implicit:none" />
</javac>

<!-- create MacOS native headers -->
Expand All @@ -377,6 +383,7 @@
<include name="jogamp/newt/driver/macosx/WindowDriver.java" />
<include name="jogamp/newt/driver/macosx/ScreenDriver.java" />
<include name="jogamp/newt/driver/macosx/DisplayDriver.java" />
<compilerarg value="-implicit:none" />
</javac>

<!-- create iOS native headers -->
Expand All @@ -396,6 +403,7 @@
<include name="jogamp/newt/driver/ios/WindowDriver.java" />
<include name="jogamp/newt/driver/ios/ScreenDriver.java" />
<include name="jogamp/newt/driver/ios/DisplayDriver.java" />
<compilerarg value="-implicit:none" />
</javac>

<!-- create X11 native headers -->
Expand All @@ -417,6 +425,7 @@
<include name="jogamp/newt/driver/x11/DisplayDriver.java" />
<include name="jogamp/newt/driver/x11/RandR11.java" />
<include name="jogamp/newt/driver/x11/RandR13.java" />
<compilerarg value="-implicit:none" />
</javac>

<javac destdir="${classes}"
Expand Down Expand Up @@ -451,6 +460,7 @@
debug="${javacdebug}" debuglevel="${javacdebuglevel}">
<classpath refid="jogl_nativewindow_gluegen_android.classpath"/>
<include name="jogamp/newt/driver/android/WindowDriver.java" />
<compilerarg value="-implicit:none" />
</javac>

<javac destdir="${classes}"
Expand Down

0 comments on commit 77ae1b7

Please sign in to comment.