Work on getting everything compiling properly in Linux.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@432 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
arcum42 2009-02-06 21:58:59 +00:00
parent 3f392e4e6e
commit 595c08df88
6 changed files with 239 additions and 223 deletions

View File

@ -16,7 +16,7 @@ export PCSX2OPTIONS="--enable-sse3 --enable-sse4 --prefix `pwd`"
#export PCSX2OPTIONS="--enable-debug --enable-devbuild --enable-sse3 --prefix `pwd`" #export PCSX2OPTIONS="--enable-debug --enable-devbuild --enable-sse3 --prefix `pwd`"
# Make sure we have plugins, and bring the normal plugins in. # Make sure we have plugins, and bring the normal plugins in.
sh fetch.sh #sh fetch.sh
option=$@ option=$@
export PCSX2PLUGINS="`pwd`/bin/plugins" export PCSX2PLUGINS="`pwd`/bin/plugins"

View File

@ -1,16 +1,16 @@
#!/bin/sh #!/bin/sh
curdir=`pwd` curdir=`pwd`
echo ---------------- echo ----------------
echo Building CDVDiso echo Building CDVDiso
echo ---------------- echo ----------------
cd ${curdir}/src/Linux cd ${curdir}/src/Linux
make $@ make $@
# copy the files # copy the files
if [ -s cfgCDVDiso ] && [ -s libCDVDiso.so ] if [ -s cfgCDVDiso ] && [ -s libCDVDiso.so ]
then then
cp cfgCDVDiso libCDVDiso.so ${PCSX2PLUGINS} cp cfgCDVDiso libCDVDiso.so ${PCSX2PLUGINS}
fi fi

View File

@ -12,10 +12,25 @@ exit 1
fi fi
} }
buildplugin gs $@ #buildplugin gs $@
buildplugin cdvd $@ #buildplugin cdvd $@
buildplugin dev9 $@ #buildplugin dev9 $@
buildplugin fw $@ #buildplugin fw $@
buildplugin pad $@ #buildplugin pad $@
buildplugin spu2 $@ #buildplugin spu2 $@
buildplugin usb $@ #buildplugin usb $@
buildplugin CDVDnull $@
buildplugin dev9null $@
buildplugin FWnull $@
buildplugin USBnull $@
buildplugin zerogs $@
buildplugin zeropad $@
buildplugin zerospu2 $@
buildplugin PeopsSPU2 $@
buildplugin CDVDiso $@
buildplugin CDVDisoEFP $@
buildplugin CDVDlinuz $@

View File

@ -0,0 +1 @@
../../../3rdparty/

View File

@ -1,49 +1,49 @@
# Create a shared library libZeroGSogl # Create a shared library libZeroGSogl
AUTOMAKE_OPTIONS = foreign AUTOMAKE_OPTIONS = foreign
noinst_LIBRARIES = libZeroGSogl.a noinst_LIBRARIES = libZeroGSogl.a
INCLUDES = -I@srcdir@/common INCLUDES = -I@srcdir@/common -I@srcdir@/3rdparty
libZeroGSogl_a_CPPFLAGS = $(shell pkg-config --cflags gtk+-2.0) libZeroGSogl_a_CPPFLAGS = $(shell pkg-config --cflags gtk+-2.0)
libZeroGSogl_a_CXXFLAGS = $(shell pkg-config --cflags gtk+-2.0) libZeroGSogl_a_CXXFLAGS = $(shell pkg-config --cflags gtk+-2.0)
if X86_64 if X86_64
libZeroGSogl_a_CPPFLAGS += -fPIC libZeroGSogl_a_CPPFLAGS += -fPIC
libZeroGSogl_a_CXXFLAGS += -fPIC libZeroGSogl_a_CXXFLAGS += -fPIC
CCASFLAGS += -fPIC CCASFLAGS += -fPIC
endif endif
# Create a shared object by faking an exe (thanks to ODE makefiles) # Create a shared object by faking an exe (thanks to ODE makefiles)
traplibdir=$(prefix) traplibdir=$(prefix)
if RELEASE_TO_PUBLIC if RELEASE_TO_PUBLIC
preext=r preext=r
endif endif
EXEEXT=$(preext)@so_ext@ EXEEXT=$(preext)@so_ext@
traplib_PROGRAMS=libZeroGSogl traplib_PROGRAMS=libZeroGSogl
libZeroGSogl_SOURCES= libZeroGSogl_SOURCES=
libZeroGSogl_DEPENDENCIES = libZeroGSogl.a libZeroGSogl_DEPENDENCIES = libZeroGSogl.a
libZeroGSogl_LDFLAGS= @SHARED_LDFLAGS@ libZeroGSogl_LDFLAGS= @SHARED_LDFLAGS@
libZeroGSogl_LDFLAGS+=-Wl,-soname,@ZEROGS_SONAME@ libZeroGSogl_LDFLAGS+=-Wl,-soname,@ZEROGS_SONAME@
libZeroGSogl_LDADD=$(libZeroGSogl_a_OBJECTS) libZeroGSogl_LDADD=$(libZeroGSogl_a_OBJECTS)
libZeroGSogl_a_SOURCES = \ libZeroGSogl_a_SOURCES = \
GSmain.cpp memcpy_amd.cpp Regs.cpp x86.cpp zpipe.cpp \ GSmain.cpp memcpy_amd.cpp Regs.cpp x86.cpp zpipe.cpp \
Mem.cpp rasterfont.cpp targets.cpp zerogs.cpp Mem.cpp rasterfont.cpp targets.cpp zerogs.cpp
if X86_64 if X86_64
libZeroGSogl_a_SOURCES += x86-64.S libZeroGSogl_a_SOURCES += x86-64.S
else else
libZeroGSogl_a_SOURCES += x86-32.S libZeroGSogl_a_SOURCES += x86-32.S
endif endif
if SSE2 if SSE2
CCASFLAGS+= -DZEROGS_SSE2 CCASFLAGS+= -DZEROGS_SSE2
endif endif
libZeroGSogl_a_DEPENDENCIES = Linux/libZeroGSLinux.a libZeroGSogl_a_DEPENDENCIES = Linux/libZeroGSLinux.a
libZeroGSogl_LDADD += Linux/libZeroGSLinux.a libZeroGSogl_LDADD += Linux/libZeroGSLinux.a
SUBDIRS = Linux . SUBDIRS = Linux .

View File

@ -1,150 +1,150 @@
AC_INIT(ZeroGSogl,0.96.2,zerofrog@gmail.com) AC_INIT(ZeroGSogl,0.96.2,zerofrog@gmail.com)
AM_INIT_AUTOMAKE(ZeroGSogl,0.96.2) AM_INIT_AUTOMAKE(ZeroGSogl,0.96.2)
AC_PROG_CC([gcc g++ cl KCC CC cxx cc++ xlC aCC c++]) AC_PROG_CC([gcc g++ cl KCC CC cxx cc++ xlC aCC c++])
AC_PROG_CXX([gcc g++ cl KCC CC cxx cc++ xlC aCC c++]) AC_PROG_CXX([gcc g++ cl KCC CC cxx cc++ xlC aCC c++])
AC_PROG_CPP([gcc g++ cl KCC CC cxx cc++ xlC aCC c++]) AC_PROG_CPP([gcc g++ cl KCC CC cxx cc++ xlC aCC c++])
AM_PROG_CC_C_O AM_PROG_CC_C_O
AC_PROG_INSTALL AC_PROG_INSTALL
AC_PROG_RANLIB AC_PROG_RANLIB
dnl necessary for compiling assembly dnl necessary for compiling assembly
AM_PROG_AS AM_PROG_AS
ZEROGS_CURRENT=0 ZEROGS_CURRENT=0
ZEROGS_REVISION=96 ZEROGS_REVISION=96
ZEROGS_AGE=2 ZEROGS_AGE=2
ZEROGS_SONAME=libZeroGSogl.so.[$ZEROGS_CURRENT].[$ZEROGS_REVISION].[$ZEROGS_AGE] ZEROGS_SONAME=libZeroGSogl.so.[$ZEROGS_CURRENT].[$ZEROGS_REVISION].[$ZEROGS_AGE]
ZEROGS_RELEASE=[$ZEROGS_CURRENT].[$ZEROGS_REVISION].[$ZEROGS_AGE] ZEROGS_RELEASE=[$ZEROGS_CURRENT].[$ZEROGS_REVISION].[$ZEROGS_AGE]
AC_SUBST(ZEROGS_CURRENT) AC_SUBST(ZEROGS_CURRENT)
AC_SUBST(ZEROGS_REVISION) AC_SUBST(ZEROGS_REVISION)
AC_SUBST(ZEROGS_AGE) AC_SUBST(ZEROGS_AGE)
AC_SUBST(ZEROGS_RELEASE) AC_SUBST(ZEROGS_RELEASE)
AC_SUBST(ZEROGS_SONAME) AC_SUBST(ZEROGS_SONAME)
CFLAGS=" -I/opt/cg/include -L/opt/cg/lib " CFLAGS=" -I/opt/cg/include -L/opt/cg/lib "
CPPFLAGS=" -I/opt/cg/include -L/opt/cg/lib " CPPFLAGS=" -I/opt/cg/include -L/opt/cg/lib "
CXXFLAGS=" -I/opt/cg/include -L/opt/cg/lib " CXXFLAGS=" -I/opt/cg/include -L/opt/cg/lib "
dnl Check for debug build dnl Check for debug build
AC_MSG_CHECKING(debug build) AC_MSG_CHECKING(debug build)
AC_ARG_ENABLE(debug, AC_HELP_STRING([--enable-debug], [debug build]), AC_ARG_ENABLE(debug, AC_HELP_STRING([--enable-debug], [debug build]),
debug=$enableval,debug=no) debug=$enableval,debug=no)
if test "x$debug" == xyes if test "x$debug" == xyes
then then
AC_DEFINE(_DEBUG,1,[_DEBUG]) AC_DEFINE(_DEBUG,1,[_DEBUG])
CFLAGS+="-g " CFLAGS+="-g "
CPPFLAGS+="-g -fpermissive " CPPFLAGS+="-g -fpermissive "
CXXFLAGS+="-g- fpermissive " CXXFLAGS+="-g- fpermissive "
else else
AC_DEFINE(NDEBUG,1,[NDEBUG]) AC_DEFINE(NDEBUG,1,[NDEBUG])
CFLAGS+="-O3 -fomit-frame-pointer " CFLAGS+="-O3 -fomit-frame-pointer "
CPPFLAGS+="-O3 -fomit-frame-pointer " CPPFLAGS+="-O3 -fomit-frame-pointer "
CXXFLAGS+="-O3 -fomit-frame-pointer -fpermissive " CXXFLAGS+="-O3 -fomit-frame-pointer -fpermissive "
fi fi
AC_MSG_RESULT($debug) AC_MSG_RESULT($debug)
AC_CHECK_FUNCS([ _aligned_malloc _aligned_free ], AC_DEFINE(HAVE_ALIGNED_MALLOC)) AC_CHECK_FUNCS([ _aligned_malloc _aligned_free ], AC_DEFINE(HAVE_ALIGNED_MALLOC))
dnl Check for dev build dnl Check for dev build
AC_MSG_CHECKING(for development build...) AC_MSG_CHECKING(for development build...)
AC_ARG_ENABLE(devbuild, AC_HELP_STRING([--enable-devbuild], [Special Build for developers that simplifies testing and adds extra checks]), AC_ARG_ENABLE(devbuild, AC_HELP_STRING([--enable-devbuild], [Special Build for developers that simplifies testing and adds extra checks]),
devbuild=$enableval,devbuild=no) devbuild=$enableval,devbuild=no)
if test "x$devbuild" == xno if test "x$devbuild" == xno
then then
AC_DEFINE(RELEASE_TO_PUBLIC,1,[RELEASE_TO_PUBLIC]) AC_DEFINE(RELEASE_TO_PUBLIC,1,[RELEASE_TO_PUBLIC])
fi fi
AC_MSG_RESULT($devbuild) AC_MSG_RESULT($devbuild)
AM_CONDITIONAL(RELEASE_TO_PUBLIC, test x$devbuild = xno) AM_CONDITIONAL(RELEASE_TO_PUBLIC, test x$devbuild = xno)
dnl Check for recompilation dnl Check for recompilation
AC_MSG_CHECKING(check for sse2...) AC_MSG_CHECKING(check for sse2...)
AC_ARG_ENABLE(sse2, AC_HELP_STRING([--enable-sse2], [Enable sse2 instructions]), AC_ARG_ENABLE(sse2, AC_HELP_STRING([--enable-sse2], [Enable sse2 instructions]),
sse2=$enableval,sse2=no) sse2=$enableval,sse2=no)
if test "x$sse2" == xyes if test "x$sse2" == xyes
then then
AC_DEFINE(ZEROGS_SSE2,1,[ZEROGS_SSE2]) AC_DEFINE(ZEROGS_SSE2,1,[ZEROGS_SSE2])
fi fi
AC_MSG_RESULT($sse2) AC_MSG_RESULT($sse2)
AM_CONDITIONAL(SSE2, test x$sse2 = xyes) AM_CONDITIONAL(SSE2, test x$sse2 = xyes)
dnl Check for 64bit CPU dnl Check for 64bit CPU
AC_MSG_CHECKING(for a x86-64 CPU) AC_MSG_CHECKING(for a x86-64 CPU)
dnl if test "$build_os" == "target_os" dnl if test "$build_os" == "target_os"
dnl then dnl then
AC_TRY_RUN([ AC_TRY_RUN([
int main() int main()
{ {
int a = 0; int a = 0;
int*pa = &a; int*pa = &a;
asm(".intel_syntax\n" asm(".intel_syntax\n"
"mov %%rax, %0\n" "mov %%rax, %0\n"
"mov %%eax, [%%rax]\n" "mov %%eax, [%%rax]\n"
".att_syntax\n" ".att_syntax\n"
: : "r"(pa) : "%rax"); : : "r"(pa) : "%rax");
return 0; return 0;
} }
],cpu64=yes,cpu64=no,) ],cpu64=yes,cpu64=no,)
dnl else dnl else
dnl cpu64=no dnl cpu64=no
dnl fi dnl fi
if test "x$cpu64" == xyes if test "x$cpu64" == xyes
then then
AC_DEFINE(__x86_64__,1,[__x86_64__]) AC_DEFINE(__x86_64__,1,[__x86_64__])
fi fi
AC_MSG_RESULT($cpu64) AC_MSG_RESULT($cpu64)
AM_CONDITIONAL(X86_64, test x$cpu64 = xyes) AM_CONDITIONAL(X86_64, test x$cpu64 = xyes)
dnl gtk dnl gtk
AC_MSG_CHECKING(gtk2+) AC_MSG_CHECKING(gtk2+)
AC_CHECK_PROG(GTK_CONFIG, pkg-config, pkg-config) AC_CHECK_PROG(GTK_CONFIG, pkg-config, pkg-config)
LIBS+=$(pkg-config --libs gtk+-2.0) LIBS+=$(pkg-config --libs gtk+-2.0)
dnl bindir = pcsx2exe dnl bindir = pcsx2exe
dnl assuming linux environment dnl assuming linux environment
so_ext=".so.$ZEROGS_RELEASE" so_ext=".so.$ZEROGS_RELEASE"
SHARED_LDFLAGS="-shared" SHARED_LDFLAGS="-shared"
AC_SUBST(so_ext) AC_SUBST(so_ext)
AC_SUBST(SHARED_LDFLAGS) AC_SUBST(SHARED_LDFLAGS)
AC_MSG_CHECKING(OpenGL) AC_MSG_CHECKING(OpenGL)
AC_CHECK_HEADERS([GL/gl.h GL/glu.h GL/glext.h],,, AC_CHECK_HEADERS([GL/gl.h GL/glu.h GL/glext.h],,,
[[#if HAVE_GL_GL_H [[#if HAVE_GL_GL_H
#include <GL/gl.h> #include <GL/gl.h>
#endif #endif
#if HAVE_GL_GLU_H #if HAVE_GL_GLU_H
#include <GL/glu.h> #include <GL/glu.h>
#endif #endif
]]) ]])
AC_CHECK_LIB(GL,main,[LIBS="$LIBS -lGL"]) AC_CHECK_LIB(GL,main,[LIBS="$LIBS -lGL"])
AC_CHECK_LIB(GLU,main,[LIBS="$LIBS -lGLU"]) AC_CHECK_LIB(GLU,main,[LIBS="$LIBS -lGLU"])
AC_CHECK_LIB(GLEW,main,[LIBS="$LIBS -lGLEW"]) AC_CHECK_LIB(GLEW,main,[LIBS="$LIBS -lGLEW"])
AC_MSG_CHECKING(Cg) AC_MSG_CHECKING(Cg)
#AC_CHECK_HEADERS([Cg/cg.h Cg/cgGL.h]) #AC_CHECK_HEADERS([Cg/cg.h Cg/cgGL.h])
AC_CHECK_LIB(jpeg,main,[LIBS="$LIBS -ljpeg"]) AC_CHECK_LIB(jpeg,main,[LIBS="$LIBS -ljpeg"])
AC_CHECK_LIB(pthread,main,[LIBS="$LIBS -lpthread"]) AC_CHECK_LIB(pthread,main,[LIBS="$LIBS -lpthread"])
AC_CHECK_LIB(stdc++,main,[LIBS="$LIBS -lstdc++"]) AC_CHECK_LIB(stdc++,main,[LIBS="$LIBS -lstdc++"])
AC_CHECK_LIB(z,main,[LIBS="$LIBS -lz"]) AC_CHECK_LIB(z,main,[LIBS="$LIBS -lz"])
AC_CHECK_LIB(dl,main,[LIBS="$LIBS -ldl"]) AC_CHECK_LIB(dl,main,[LIBS="$LIBS -ldl"])
AC_CHECK_LIB(Xxf86vm,main,[LIBS="$LIBS -lXxf86vm"]) AC_CHECK_LIB(Xxf86vm,main,[LIBS="$LIBS -lXxf86vm"])
dnl AC_CHECK_LIB(Cg,cgCreateContext,[LIBS="$LIBS -lCg"]) dnl AC_CHECK_LIB(Cg,cgCreateContext,[LIBS="$LIBS -lCg"])
dnl AC_CHECK_LIB(CgGL,cgGLEnableProfile,[LIBS="$LIBS -lCgGL"]) dnl AC_CHECK_LIB(CgGL,cgGLEnableProfile,[LIBS="$LIBS -lCgGL"])
LIBS+=" -lCg -lCgGL" LIBS+=" -lCg -lCgGL"
AC_OUTPUT([ AC_OUTPUT([
Makefile Makefile
Linux/Makefile Linux/Makefile
]) ])
echo "Configuration:" echo "Configuration:"
echo " Target system type: $target" echo " Target system type: $target"
echo " x86-64 build? $cpu64" echo " x86-64 build? $cpu64"
echo " Debug build? $debug" echo " Debug build? $debug"
echo " Dev build? $devbuild" echo " Dev build? $devbuild"
echo " SSE2 enabled? $sse2" echo " SSE2 enabled? $sse2"