Linux: Added -lm and -std=c99 to fix the warning abount round(). Removed some unnecessary headers

This commit is contained in:
Elias Naur 2005-11-23 15:10:05 +00:00
parent 3c83a92a64
commit 4c68fc2ecf
3 changed files with 3 additions and 5 deletions

View File

@ -4,8 +4,8 @@ CC=gcc
LINKER=gcc
STRIP=strip
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
CFLAGS_O=-fPIC -O2 -D_X11 -Wall -pthread -c -I../common -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/linux -I$(AL_HOME)/include
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 -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)
OBJECTS=$(subst .c,.o,$(SRC))
LIBRARY=liblwjgl.so

View File

@ -279,7 +279,7 @@ JNIEXPORT jobject JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nConvertToNativeRam
int i;
for (i = 0; i < length; i++) {
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 + length] = scaled_gamma_short;
native_ramp_ptr[i + length*2] = scaled_gamma_short;

View File

@ -45,9 +45,7 @@
#include <X11/Xutil.h>
#include "awt_tools.h"
#include "org_lwjgl_opengl_LinuxAWTGLCanvasPeerInfo.h"
#include "extgl_glx.h"
#include "context.h"
#include "Window.h"
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxAWTGLCanvasPeerInfo_nInitHandle
(JNIEnv *env, jclass clazz, int screen, jobject lock_buffer_handle, jobject peer_info_handle) {