Linux: Added -lm and -std=c99 to fix the warning abount round(). Removed some unnecessary headers
This commit is contained in:
parent
3c83a92a64
commit
4c68fc2ecf
|
@ -4,8 +4,8 @@ CC=gcc
|
||||||
LINKER=gcc
|
LINKER=gcc
|
||||||
STRIP=strip
|
STRIP=strip
|
||||||
CFLAGS_LINK=-shared -Wall
|
CFLAGS_LINK=-shared -Wall
|
||||||
LIBS=-L/usr/X11R6/lib -L/usr/X11/lib -lX11 -lXext -lpthread -L$(JAVA_HOME)/jre/lib/i386 -ljawt -Wl,-static,-lXxf86vm,-lXcursor,-lXrender,-lXrandr,-call_shared
|
LIBS=-L/usr/X11R6/lib -L/usr/X11/lib -lm -lX11 -lXext -lpthread -L$(JAVA_HOME)/jre/lib/i386 -ljawt -Wl,-static,-lXxf86vm,-lXcursor,-lXrender,-lXrandr,-call_shared
|
||||||
CFLAGS_O=-fPIC -O2 -D_X11 -Wall -pthread -c -I../common -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/linux -I$(AL_HOME)/include
|
CFLAGS_O=-fPIC -O2 -D_X11 -Wall -std=c99 -pthread -c -I../common -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/linux -I$(AL_HOME)/include
|
||||||
SRC=$(wildcard *.c) $(wildcard ../common/*.c) $(wildcard ../generated/*c)
|
SRC=$(wildcard *.c) $(wildcard ../common/*.c) $(wildcard ../generated/*c)
|
||||||
OBJECTS=$(subst .c,.o,$(SRC))
|
OBJECTS=$(subst .c,.o,$(SRC))
|
||||||
LIBRARY=liblwjgl.so
|
LIBRARY=liblwjgl.so
|
||||||
|
|
|
@ -279,7 +279,7 @@ JNIEXPORT jobject JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nConvertToNativeRam
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < length; i++) {
|
for (i = 0; i < length; i++) {
|
||||||
float scaled_gamma = ramp_ptr[i]*0xffff;
|
float scaled_gamma = ramp_ptr[i]*0xffff;
|
||||||
short scaled_gamma_short = (unsigned short)round(scaled_gamma);
|
short scaled_gamma_short = (unsigned short)roundf(scaled_gamma);
|
||||||
native_ramp_ptr[i] = scaled_gamma_short;
|
native_ramp_ptr[i] = scaled_gamma_short;
|
||||||
native_ramp_ptr[i + length] = scaled_gamma_short;
|
native_ramp_ptr[i + length] = scaled_gamma_short;
|
||||||
native_ramp_ptr[i + length*2] = scaled_gamma_short;
|
native_ramp_ptr[i + length*2] = scaled_gamma_short;
|
||||||
|
|
|
@ -45,9 +45,7 @@
|
||||||
#include <X11/Xutil.h>
|
#include <X11/Xutil.h>
|
||||||
#include "awt_tools.h"
|
#include "awt_tools.h"
|
||||||
#include "org_lwjgl_opengl_LinuxAWTGLCanvasPeerInfo.h"
|
#include "org_lwjgl_opengl_LinuxAWTGLCanvasPeerInfo.h"
|
||||||
#include "extgl_glx.h"
|
|
||||||
#include "context.h"
|
#include "context.h"
|
||||||
#include "Window.h"
|
|
||||||
|
|
||||||
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxAWTGLCanvasPeerInfo_nInitHandle
|
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxAWTGLCanvasPeerInfo_nInitHandle
|
||||||
(JNIEnv *env, jclass clazz, int screen, jobject lock_buffer_handle, jobject peer_info_handle) {
|
(JNIEnv *env, jclass clazz, int screen, jobject lock_buffer_handle, jobject peer_info_handle) {
|
||||||
|
|
Loading…
Reference in New Issue