;;
esac
-AM_CONDITIONAL(HAVE_OS_WIN32, test "$HAVE_WIN32" = "yes")
-AM_CONDITIONAL(HAVE_OS_LINUX, test "$HAVE_LINUX" = "yes")
+AM_CONDITIONAL(HAVE_OS_WIN32, test "$HAVE_OS_WIN32" = "yes")
+AM_CONDITIONAL(HAVE_OS_LINUX, test "$HAVE_OS_LINUX" = "yes")
])
lib_LTLIBRARIES = liborc-@ORC_MAJORMINOR@.la
liborc_@ORC_MAJORMINOR@_la_LIBS = $(ORC_LIBS)
+liborc_@ORC_MAJORMINOR@_la_LDFLAGS = \
+ -no-undefined -export-symbols-regex 'orc_'
liborc_@ORC_MAJORMINOR@_la_CFLAGS = $(ORC_CFLAGS)
liborc_@ORC_MAJORMINOR@_la_SOURCES = \
orcprogram-sse.c \
orcprogram.h \
orcopcodes.c \
- orcprogram-linux.c \
orcrules-mmx.c \
orcrules-sse.c \
orcdebug.c \
orccpu.c \
x86.c
+if HAVE_OS_LINUX
+liborc_@ORC_MAJORMINOR@_la_SOURCES += orcprogram-linux.c
+endif
+if HAVE_OS_WIN32
+liborc_@ORC_MAJORMINOR@_la_SOURCES += orcprogram-win32.c
+endif
+
if HAVE_I386
liborc_@ORC_MAJORMINOR@_la_SOURCES += orccpu-x86.c
else
#include <unistd.h>
#include <sys/types.h>
-#include <sys/mman.h>
#include <orc/orcprogram.h>
#include <orc/x86.h>
#include <unistd.h>
#include <sys/types.h>
-#include <sys/mman.h>
#include <orc/orcprogram.h>
--- /dev/null
+
+#include "config.h"
+
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+
+#include <unistd.h>
+#include <sys/types.h>
+
+#include <orc/orcprogram.h>
+
+#define SIZE 65536
+
+
+void
+orc_program_allocate_codemem (OrcProgram *program)
+{
+ /* Now you know why Windows has viruses */
+
+ program->code = malloc(SIZE);
+ program->code_exec = program->code;
+ program->code_size = SIZE;
+ program->codeptr = program->code;
+}
+
#include <unistd.h>
#include <sys/types.h>
-#include <sys/mman.h>
#include <orc/orcprogram.h>
#include <orc/x86.h>