Kill off automake/autoconf/libtool build system and replace by a much simpler Makefile
This commit is contained in:
parent
0fb264180e
commit
47c8343728
|
@ -1,31 +0,0 @@
|
||||||
noinst_LTLIBRARIES = libcommon.la libtools.la
|
|
||||||
|
|
||||||
SUBDIRS = arb ati ext nv
|
|
||||||
|
|
||||||
libcommon_la_SOURCES = $(COMMON)
|
|
||||||
libcommon_la_LIBADD = $(DEP_LIBS)
|
|
||||||
libcommon_la_DEPENDENCIES = $(DEP_LIBS)
|
|
||||||
libtools_la_SOURCES = $(TOOLS)
|
|
||||||
DEP_LIBS=libtools.la arb/libarb.la ati/libati.la ext/libext.la nv/libnv.la
|
|
||||||
|
|
||||||
TOOLS = \
|
|
||||||
common_tools.c \
|
|
||||||
common_tools.h
|
|
||||||
|
|
||||||
COMMON = \
|
|
||||||
extal.c \
|
|
||||||
extgl.c \
|
|
||||||
org_lwjgl_openal_ALC.c \
|
|
||||||
org_lwjgl_openal_AL.c \
|
|
||||||
org_lwjgl_openal_AL10.c \
|
|
||||||
org_lwjgl_openal_eax_EAX.c \
|
|
||||||
org_lwjgl_openal_eax_EAX20.c \
|
|
||||||
org_lwjgl_openal_eax_EAXBufferProperties.c \
|
|
||||||
org_lwjgl_openal_eax_EAXListenerProperties.c \
|
|
||||||
org_lwjgl_opengl_GLContext.c \
|
|
||||||
org_lwjgl_opengl_GL11.c \
|
|
||||||
org_lwjgl_opengl_GL12.c \
|
|
||||||
org_lwjgl_opengl_GL13.c \
|
|
||||||
org_lwjgl_opengl_GL14.c \
|
|
||||||
org_lwjgl_opengl_GL15.c \
|
|
||||||
org_lwjgl_opengl_GL20.c
|
|
|
@ -1,21 +0,0 @@
|
||||||
noinst_LTLIBRARIES = libarb.la
|
|
||||||
|
|
||||||
libarb_la_SOURCES = $(SRC)
|
|
||||||
INCLUDES=-I..
|
|
||||||
SRC = org_lwjgl_opengl_ARBBufferObject.c \
|
|
||||||
org_lwjgl_opengl_ARBColorBufferFloat.c \
|
|
||||||
org_lwjgl_opengl_ARBDrawBuffers.c \
|
|
||||||
org_lwjgl_opengl_ARBProgram.c \
|
|
||||||
org_lwjgl_opengl_ARBMatrixPalette.c \
|
|
||||||
org_lwjgl_opengl_ARBMultisample.c \
|
|
||||||
org_lwjgl_opengl_ARBMultitexture.c \
|
|
||||||
org_lwjgl_opengl_ARBPointParameters.c \
|
|
||||||
org_lwjgl_opengl_ARBTextureCompression.c \
|
|
||||||
org_lwjgl_opengl_ARBTransposeMatrix.c \
|
|
||||||
org_lwjgl_opengl_ARBVertexBlend.c \
|
|
||||||
org_lwjgl_opengl_ARBVertexProgram.c \
|
|
||||||
org_lwjgl_opengl_ARBWindowPos.c \
|
|
||||||
org_lwjgl_opengl_ARBOcclusionQuery.c \
|
|
||||||
org_lwjgl_opengl_ARBShaderObjects.c \
|
|
||||||
org_lwjgl_opengl_ARBVertexShader.c \
|
|
||||||
org_lwjgl_opengl_ARBImaging.c
|
|
|
@ -1,14 +0,0 @@
|
||||||
noinst_LTLIBRARIES = libati.la
|
|
||||||
|
|
||||||
libati_la_SOURCES = $(SRC)
|
|
||||||
INCLUDES=-I..
|
|
||||||
SRC=org_lwjgl_opengl_ATIElementArray.c \
|
|
||||||
org_lwjgl_opengl_ATIEnvmapBumpmap.c \
|
|
||||||
org_lwjgl_opengl_ATIFragmentShader.c \
|
|
||||||
org_lwjgl_opengl_ATIPnTriangles.c \
|
|
||||||
org_lwjgl_opengl_ATISeparateStencil.c \
|
|
||||||
org_lwjgl_opengl_ATIVertexArrayObject.c \
|
|
||||||
org_lwjgl_opengl_ATIVertexStreams.c \
|
|
||||||
org_lwjgl_opengl_ATIDrawBuffers.c \
|
|
||||||
org_lwjgl_opengl_ATIMapObjectBuffer.c \
|
|
||||||
org_lwjgl_opengl_ATIVertexAttribArrayObject.c
|
|
|
@ -74,40 +74,6 @@ extern "C" {
|
||||||
#define ALCAPI
|
#define ALCAPI
|
||||||
#define ALCAPIENTRY
|
#define ALCAPIENTRY
|
||||||
|
|
||||||
#ifdef _X11
|
|
||||||
/** ALC boolean type. */
|
|
||||||
typedef char ALCboolean;
|
|
||||||
|
|
||||||
/** ALC 8bit signed byte. */
|
|
||||||
typedef char ALCbyte;
|
|
||||||
|
|
||||||
/** ALC 8bit unsigned byte. */
|
|
||||||
typedef unsigned char ALCubyte;
|
|
||||||
|
|
||||||
/** ALC 16bit signed short integer type. */
|
|
||||||
typedef short ALCshort;
|
|
||||||
|
|
||||||
/** ALC 16bit unsigned short integer type. */
|
|
||||||
typedef unsigned short ALCushort;
|
|
||||||
|
|
||||||
/** ALC 32bit unsigned integer type. */
|
|
||||||
typedef unsigned ALCuint;
|
|
||||||
|
|
||||||
/** ALC 32bit signed integer type. */
|
|
||||||
typedef int ALCint;
|
|
||||||
|
|
||||||
/** ALC 32bit floating point type. */
|
|
||||||
typedef float ALCfloat;
|
|
||||||
|
|
||||||
/** ALC 64bit double point type. */
|
|
||||||
typedef double ALCdouble;
|
|
||||||
|
|
||||||
/** ALC 32bit type. */
|
|
||||||
typedef unsigned int ALCsizei;
|
|
||||||
|
|
||||||
/** ALC void type */
|
|
||||||
typedef void ALCvoid;
|
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
|
|
|
@ -1,11 +0,0 @@
|
||||||
lib_LTLIBRARIES = liblwjgl-fmod3.la
|
|
||||||
liblwjgl_fmod3_la_SOURCES = $(FMOD_SOURCE)
|
|
||||||
liblwjgl_fmod3_la_LIBADD = $(DEP_LIBS)
|
|
||||||
liblwjgl_fmod3_la_DEPENDENCIES = $(DEP_LIBS)
|
|
||||||
INCLUDES = -I..
|
|
||||||
DEP_LIBS = ../libtools.la
|
|
||||||
|
|
||||||
FMOD_SOURCE = extfmod3.c \
|
|
||||||
org_lwjgl_fmod3_FMOD.c \
|
|
||||||
org_lwjgl_fmod3_FMusic.c \
|
|
||||||
org_lwjgl_fmod3_FSound.c
|
|
|
@ -1,17 +0,0 @@
|
||||||
noinst_LTLIBRARIES = libnv.la
|
|
||||||
|
|
||||||
libnv_la_SOURCES = $(SRC)
|
|
||||||
INCLUDES=-I..
|
|
||||||
SRC=org_lwjgl_opengl_NVEvaluators.c \
|
|
||||||
org_lwjgl_opengl_NVFence.c \
|
|
||||||
org_lwjgl_opengl_NVFragmentProgram.c \
|
|
||||||
org_lwjgl_opengl_NVOcclusionQuery.c \
|
|
||||||
org_lwjgl_opengl_NVPointSprite.c \
|
|
||||||
org_lwjgl_opengl_NVProgram.c \
|
|
||||||
org_lwjgl_opengl_NVRegisterCombiners.c \
|
|
||||||
org_lwjgl_opengl_NVRegisterCombiners2.c \
|
|
||||||
org_lwjgl_opengl_NVVertexArrayRange.c \
|
|
||||||
org_lwjgl_opengl_NVVertexProgram.c \
|
|
||||||
org_lwjgl_opengl_NVHalfFloat.c \
|
|
||||||
org_lwjgl_opengl_NVPixelDataRange.c \
|
|
||||||
org_lwjgl_opengl_NVPrimitiveRestart.c
|
|
|
@ -1,73 +0,0 @@
|
||||||
# -*- Autoconf -*-
|
|
||||||
# Process this file with autoconf to produce a configure script.
|
|
||||||
|
|
||||||
#AC_PREREQ(2.57)
|
|
||||||
AC_INIT(LWJGL, 0.9)
|
|
||||||
AM_INIT_AUTOMAKE()
|
|
||||||
AC_CONFIG_SRCDIR([autogen.sh])
|
|
||||||
AM_CONFIG_HEADER([config.h])
|
|
||||||
|
|
||||||
AC_DISABLE_STATIC
|
|
||||||
|
|
||||||
# Checks for programs.
|
|
||||||
AC_PROG_CC
|
|
||||||
AC_PROG_INSTALL
|
|
||||||
AC_PROG_LN_S
|
|
||||||
AC_PROG_MAKE_SET
|
|
||||||
|
|
||||||
AC_CANONICAL_HOST
|
|
||||||
|
|
||||||
case "$host_os" in
|
|
||||||
bsdi* | linux* | solaris*) AC_PATH_XTRA
|
|
||||||
AC_LIBTOOL_DLOPEN
|
|
||||||
_BUILD_FLAGS="-pthread -D_X11 $X_CFLAGS"
|
|
||||||
LDFLAGS="-Wl,-static,-lXcursor,-lXrender,-lXrandr,-call_shared"
|
|
||||||
AC_CHECK_HEADERS([AL/altypes.h AL/alctypes.h],, AC_MSG_ERROR([OpenAL headers required]))
|
|
||||||
NATIVE_BUILD_DIR=linux
|
|
||||||
CFLAGS="$CFLAGS -Wall $_BUILD_FLAGS"
|
|
||||||
LIBS="$LIBS $X_LIBS"
|
|
||||||
AC_CHECK_LIB(X11, XOpenDisplay,, AC_MSG_ERROR(X11 is required))
|
|
||||||
AC_CHECK_LIB(Xext, main,, AC_MSG_ERROR(Xext is required))
|
|
||||||
AC_CHECK_LIB(Xxf86vm, main,, AC_MSG_ERROR(Xxf86vm is required))
|
|
||||||
AC_CHECK_LIB(pthread, pthread_create,, AC_MSG_ERROR(pthread is required))
|
|
||||||
;;
|
|
||||||
*) AC_MSG_ERROR([Unsupported system $host_os]);;
|
|
||||||
esac
|
|
||||||
|
|
||||||
AC_PROG_LIBTOOL
|
|
||||||
|
|
||||||
AC_JNI_INCLUDE_DIR
|
|
||||||
|
|
||||||
for JNI_INCLUDE_DIR in $JNI_INCLUDE_DIRS
|
|
||||||
do
|
|
||||||
CFLAGS="$CFLAGS -I$JNI_INCLUDE_DIR"
|
|
||||||
done
|
|
||||||
|
|
||||||
AC_SUBST(native_build_dir, [$NATIVE_BUILD_DIR])
|
|
||||||
|
|
||||||
# Checks for libraries.
|
|
||||||
|
|
||||||
# Checks for header files.
|
|
||||||
AC_HEADER_STDC
|
|
||||||
|
|
||||||
AC_CHECK_HEADER([stddef.h stdlib.h string.h sys/time.h])
|
|
||||||
|
|
||||||
# Checks for typedefs, structures, and compiler characteristics.
|
|
||||||
#AC_HEADER_STDBOOL
|
|
||||||
AC_C_CONST
|
|
||||||
AC_C_INLINE
|
|
||||||
AC_HEADER_TIME
|
|
||||||
|
|
||||||
# Checks for library functions.
|
|
||||||
AC_FUNC_MALLOC
|
|
||||||
AC_CHECK_FUNCS([gettimeofday memset strchr strstr])
|
|
||||||
|
|
||||||
AC_CONFIG_FILES([Makefile
|
|
||||||
common/Makefile
|
|
||||||
common/arb/Makefile
|
|
||||||
common/ati/Makefile
|
|
||||||
common/ext/Makefile
|
|
||||||
common/nv/Makefile
|
|
||||||
common/fmod3/Makefile
|
|
||||||
linux/Makefile])
|
|
||||||
AC_OUTPUT
|
|
|
@ -0,0 +1,21 @@
|
||||||
|
|
||||||
|
|
||||||
|
CC=gcc
|
||||||
|
LINKER=gcc
|
||||||
|
STRIP=strip
|
||||||
|
CFLAGS_LINK=-shared -Wall
|
||||||
|
LIBS=-L/usr/X11/lib -lX11 -lXext -lXxf86vm -lpthread -Wl,-static,-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
|
||||||
|
SRC=$(wildcard *.c) $(wildcard ../common/*.c) $(wildcard ../common/arb/*.c) $(wildcard ../common/ati/*.c) $(wildcard ../common/ext/*.c) $(wildcard ../common/nv/*.c)
|
||||||
|
OBJECTS=$(subst .c,.o,$(SRC))
|
||||||
|
LIBRARY=liblwjgl.so
|
||||||
|
|
||||||
|
$(LIBRARY): $(OBJECTS)
|
||||||
|
$(LINKER) $(CFLAGS_LINK) -o $@ $(OBJECTS) $(LIBS)
|
||||||
|
$(STRIP) $@
|
||||||
|
|
||||||
|
.c.o:
|
||||||
|
$(CC) $(CFLAGS_O) $< -o $@
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -f $(OBJECTS) $(LIBRARY)
|
|
@ -1,18 +0,0 @@
|
||||||
noinst_LTLIBRARIES = libnative.la
|
|
||||||
|
|
||||||
libnative_la_SOURCES = $(NATIVE)
|
|
||||||
#libnative_la_LIBADD = -lXrender -lXcursor
|
|
||||||
#libnative_la_LDFLAGS = -Wl,-static,-lXcursor,-lXrender,-call_shared
|
|
||||||
INCLUDES = -I../common
|
|
||||||
|
|
||||||
NATIVE = \
|
|
||||||
org_lwjgl_Sys.c \
|
|
||||||
org_lwjgl_input_Controller.c \
|
|
||||||
org_lwjgl_input_Keyboard.c \
|
|
||||||
org_lwjgl_input_Mouse.c \
|
|
||||||
org_lwjgl_input_Cursor.c \
|
|
||||||
org_lwjgl_opengl_Display.c \
|
|
||||||
org_lwjgl_opengl_Pbuffer.c \
|
|
||||||
display.c \
|
|
||||||
extgl_glx.c
|
|
||||||
|
|
|
@ -6,25 +6,15 @@ CC=gcc
|
||||||
LINKER=gcc
|
LINKER=gcc
|
||||||
STRIP=strip
|
STRIP=strip
|
||||||
CFLAGS_LINK=-dynamiclib -Wall
|
CFLAGS_LINK=-dynamiclib -Wall
|
||||||
#FRAMEWORKS=-framework OpenGL -framework AppKit -framework JavaVM
|
|
||||||
FRAMEWORKS=-framework Foundation -framework AppKit -framework JavaVM
|
FRAMEWORKS=-framework Foundation -framework AppKit -framework JavaVM
|
||||||
CFLAGS_O=-O2 -D_MACOSX -Wall -c -I${AL}/include -I../common -I/System/Library/Frameworks/JavaVM.framework/Versions/A/Headers
|
CFLAGS_O=-fPIC O2 -D_MACOSX -Wall -c -I${AL}/include -I../common -I/System/Library/Frameworks/JavaVM.framework/Versions/A/Headers
|
||||||
#SRC:=$(shell find . -name \*.c -print) $(shell find ../common -name \*.c)
|
|
||||||
SRC=$(wildcard *.m) $(wildcard *.c) $(wildcard ../common/*.c) $(wildcard ../common/arb/*.c) $(wildcard ../common/ati/*.c) $(wildcard ../common/ext/*.c) $(wildcard ../common/nv/*.c)
|
SRC=$(wildcard *.m) $(wildcard *.c) $(wildcard ../common/*.c) $(wildcard ../common/arb/*.c) $(wildcard ../common/ati/*.c) $(wildcard ../common/ext/*.c) $(wildcard ../common/nv/*.c)
|
||||||
OBJECTS=$(subst .m,.o, $(subst .c,.o,$(SRC)))
|
OBJECTS=$(subst .m,.o, $(subst .c,.o,$(SRC)))
|
||||||
#OBJECTS=org_lwjgl_opengl_Display.o \
|
|
||||||
# org_lwjgl_Sys.o \
|
|
||||||
# ../common/extgl.o \
|
|
||||||
# ../common/extal.o \
|
|
||||||
# ../common/org_lwjgl_openal_AL.o \
|
|
||||||
# ../common/org_lwjgl_openal_ALC.o \
|
|
||||||
# ../common/org_lwjgl_openal_AL10.o \
|
|
||||||
# ../common/common_tools.o
|
|
||||||
LIBRARY=liblwjgl.jnilib
|
LIBRARY=liblwjgl.jnilib
|
||||||
|
|
||||||
$(LIBRARY): $(OBJECTS)
|
$(LIBRARY): $(OBJECTS)
|
||||||
$(LINKER) $(CFLAGS_LINK) -o $@ $(OBJECTS) $(FRAMEWORKS)
|
$(LINKER) $(CFLAGS_LINK) -o $@ $(OBJECTS) $(FRAMEWORKS)
|
||||||
# $(STRIP) -S -X $@
|
$(STRIP) -S -X $@
|
||||||
|
|
||||||
.m.o:
|
.m.o:
|
||||||
$(CC) $(CFLAGS_O) $< -o $@
|
$(CC) $(CFLAGS_O) $< -o $@
|
||||||
|
@ -33,4 +23,4 @@ $(LIBRARY): $(OBJECTS)
|
||||||
$(CC) $(CFLAGS_O) $< -o $@
|
$(CC) $(CFLAGS_O) $< -o $@
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f ${OBJECTS} ${LIBRARY}
|
rm -f $(OBJECTS) $(LIBRARY)
|
||||||
|
|
Loading…
Reference in New Issue