From 363ba63dc9e896e4b8158012d28ffe65fe108b4c Mon Sep 17 00:00:00 2001 From: yabause Date: Thu, 6 Apr 2006 20:41:56 +0000 Subject: [PATCH] Adding autotools stuff. Still need to write the windows Makefile.am. --- desmume/ChangeLog | 0 desmume/Makefile.am | 1 + desmume/configure.ac | 42 +++++++++++++++++++++++++++++++++++++ desmume/src/Makefile.am | 10 +++++++++ desmume/src/gtk/Makefile.am | 4 ++++ 5 files changed, 57 insertions(+) create mode 100644 desmume/ChangeLog create mode 100644 desmume/Makefile.am create mode 100644 desmume/configure.ac create mode 100644 desmume/src/Makefile.am create mode 100644 desmume/src/gtk/Makefile.am diff --git a/desmume/ChangeLog b/desmume/ChangeLog new file mode 100644 index 000000000..e69de29bb diff --git a/desmume/Makefile.am b/desmume/Makefile.am new file mode 100644 index 000000000..af437a64d --- /dev/null +++ b/desmume/Makefile.am @@ -0,0 +1 @@ +SUBDIRS = src diff --git a/desmume/configure.ac b/desmume/configure.ac new file mode 100644 index 000000000..af23fe971 --- /dev/null +++ b/desmume/configure.ac @@ -0,0 +1,42 @@ +AC_INIT(desmume, 0.33) + +AC_CANONICAL_HOST +AC_CANONICAL_TARGET + +AM_INIT_AUTOMAKE(desmume, 0.33) + +AC_PROG_CC +AC_PROG_CXX +AC_PROG_INSTALL +AC_PROG_RANLIB + +AC_LANG(C) + +AC_C_BIGENDIAN + +AC_PATH_PROGS(HAVE_LIBSDL, [sdl-config sdl11-config]) + +if test x$HAVE_LIBSDL = x ; then + AC_MSG_ERROR([You need to install SDL]) +else + SDL_CFLAGS=`$HAVE_LIBSDL --cflags` + SDL_LIBS=`$HAVE_LIBSDL --libs` + CXXFLAGS="$CXXFLAGS $SDL_CFLAGS" + LIBS="$LIBS $SDL_LIBS" +fi + + +AC_CHECK_TOOL(HAVE_PKG, pkg-config) + +if test ! x$HAVE_PKG = x ; then + GTK_CFLAGS=`$HAVE_PKG gtk+-2.0 --cflags` + GTK_LIBS=`$HAVE_PKG gtk+-2.0 --libs` + AC_SUBST(GTK_CFLAGS) + AC_SUBST(GTK_LIBS) +fi + +AC_CONFIG_FILES([Makefile + src/Makefile + src/gtk/Makefile +]) +AC_OUTPUT diff --git a/desmume/src/Makefile.am b/desmume/src/Makefile.am new file mode 100644 index 000000000..befa339d2 --- /dev/null +++ b/desmume/src/Makefile.am @@ -0,0 +1,10 @@ +SUBDIRS = . gtk +noinst_LIBRARIES = libdesmume.a +libdesmume_a_SOURCES = \ + ARM_CPU.cpp ARM_CPU.hpp \ + arm_instructions.cpp arm_instructions.hpp \ + bios.cpp bios.hpp CP15.cpp CP15.hpp \ + Disassembler.cpp Disassembler.hpp \ + GPU.cpp GPU.hpp log.cpp log.hpp \ + MMU.cpp MMU.hpp NDSSystem.cpp NDSSystem.hpp \ + thumb_instructions.cpp thumb_instructions.hpp diff --git a/desmume/src/gtk/Makefile.am b/desmume/src/gtk/Makefile.am new file mode 100644 index 000000000..dd02f55b4 --- /dev/null +++ b/desmume/src/gtk/Makefile.am @@ -0,0 +1,4 @@ +bin_PROGRAMS = desmume +desmume_SOURCES = main.cpp +desmume_LDADD = ../libdesmume.a $(GTK_LIBS) +desmume_CXXFLAGS = $(GTK_CFLAGS)