Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'bundles/org.eclipse.equinox.executable/library/gtk')
-rw-r--r--bundles/org.eclipse.equinox.executable/library/gtk/.cvsignore2
-rw-r--r--bundles/org.eclipse.equinox.executable/library/gtk/build.sh140
-rw-r--r--bundles/org.eclipse.equinox.executable/library/gtk/build.xml30
-rw-r--r--bundles/org.eclipse.equinox.executable/library/gtk/eclipseGtk.c280
-rw-r--r--bundles/org.eclipse.equinox.executable/library/gtk/eclipseGtkCommon.c98
-rw-r--r--bundles/org.eclipse.equinox.executable/library/gtk/make_linux.mak92
-rw-r--r--bundles/org.eclipse.equinox.executable/library/gtk/make_solaris.mak79
7 files changed, 721 insertions, 0 deletions
diff --git a/bundles/org.eclipse.equinox.executable/library/gtk/.cvsignore b/bundles/org.eclipse.equinox.executable/library/gtk/.cvsignore
new file mode 100644
index 000000000..5535df034
--- /dev/null
+++ b/bundles/org.eclipse.equinox.executable/library/gtk/.cvsignore
@@ -0,0 +1,2 @@
+*.o
+eclipse
diff --git a/bundles/org.eclipse.equinox.executable/library/gtk/build.sh b/bundles/org.eclipse.equinox.executable/library/gtk/build.sh
new file mode 100644
index 000000000..aca00675e
--- /dev/null
+++ b/bundles/org.eclipse.equinox.executable/library/gtk/build.sh
@@ -0,0 +1,140 @@
+#!/bin/sh
+#*******************************************************************************
+# Copyright (c) 2000, 2005 IBM Corporation and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# IBM Corporation - initial API and implementation
+# Kevin Cornell (Rational Software Corporation)
+#*******************************************************************************
+#
+# Usage: sh build.sh [<optional switches>] [clean]
+#
+# where the optional switches are:
+# -output <PROGRAM_OUTPUT> - executable filename ("eclipse")
+# -os <DEFAULT_OS> - default Eclipse "-os" value
+# -arch <DEFAULT_OS_ARCH> - default Eclipse "-arch" value
+# -ws <DEFAULT_WS> - default Eclipse "-ws" value
+#
+#
+# This script can also be invoked with the "clean" argument.
+
+cd `dirname $0`
+
+# Define default values for environment variables used in the makefiles.
+programOutput="eclipse"
+defaultOS=""
+defaultOSArch=""
+defaultWS="gtk"
+makefile=""
+if [ "$OS" = "" ]; then
+ OS=`uname -s`
+fi
+if [ "$MODEL" = "" ]; then
+ MODEL=`uname -m`
+fi
+if [ "${CC}" = "" ]; then
+ CC=gcc
+ export CC
+fi
+
+case $OS in
+ "Linux")
+ makefile="make_linux.mak"
+ defaultOS="linux"
+ case $MODEL in
+ "x86_64")
+ defaultOSArch="x86_64"
+ OUTPUT_DIR="../../bin/$defaultWS/$defaultOS/$defaultOSArch"
+ ;;
+ i?86)
+ defaultOSArch="x86"
+ OUTPUT_DIR="../../bin/$defaultWS/$defaultOS/$defaultOSArch"
+ ;;
+ "ppc")
+ defaultOSArch="ppc"
+ OUTPUT_DIR="../../bin/$defaultWS/$defaultOS/$defaultOSArch"
+ ;;
+ "ppc64")
+ defaultOSArch="ppc64"
+ OUTPUT_DIR="../../bin/$defaultWS/$defaultOS/$defaultOSArch"
+ ;;
+ "ia64")
+ defaultOSArch="ia64"
+ OUTPUT_DIR="../../bin/$defaultWS/$defaultOS/$defaultOSArch"
+ ;;
+ *)
+ echo "*** Unknown MODEL <${MODEL}>"
+ ;;
+ esac
+ ;;
+ "SunOS")
+ makefile="make_solaris.mak"
+ defaultOS="solaris"
+ OUTPUT_DIR="../../bin/$defaultWS/$defaultOS/$defaultOSArch"
+ PATH=/usr/ccs/bin:/usr/local/bin:$PATH
+ export PATH
+ if [ "$PROC" = "" ]; then
+ PROC=`uname -p`
+ fi
+ case ${PROC} in
+ "i386")
+ defaultOSArch="x86"
+ ;;
+ "sparc")
+ defaultOSArch="sparc"
+ ;;
+ *)
+ echo "*** Unknown processor type <${PROC}>"
+ ;;
+ esac
+ ;;
+ *)
+ echo "Unknown OS -- build aborted"
+ ;;
+esac
+
+# Parse the command line arguments and override the default values.
+extraArgs=""
+while [ "$1" != "" ]; do
+ if [ "$1" = "-os" ] && [ "$2" != "" ]; then
+ defaultOS="$2"
+ shift
+ elif [ "$1" = "-arch" ] && [ "$2" != "" ]; then
+ defaultOSArch="$2"
+ shift
+ elif [ "$1" = "-ws" ] && [ "$2" != "" ]; then
+ defaultWS="$2"
+ shift
+ elif [ "$1" = "-output" ] && [ "$2" != "" ]; then
+ programOutput="$2"
+ shift
+ else
+ extraArgs="$extraArgs $1"
+ fi
+ shift
+done
+
+# Set up environment variables needed by the makefiles.
+PROGRAM_OUTPUT="$programOutput"
+DEFAULT_OS="$defaultOS"
+DEFAULT_OS_ARCH="$defaultOSArch"
+DEFAULT_WS="$defaultWS"
+
+export OUTPUT_DIR PROGRAM_OUTPUT DEFAULT_OS DEFAULT_OS_ARCH DEFAULT_WS
+
+# If the OS is supported (a makefile exists)
+if [ "$makefile" != "" ]; then
+ if [ "$extraArgs" != "" ]; then
+ make -f $makefile $extraArgs
+ else
+ echo "Building $OS launcher. Defaults: -os $DEFAULT_OS -arch $DEFAULT_OS_ARCH -ws $DEFAULT_WS"
+ make -f $makefile clean
+ make -f $makefile all
+ fi
+else
+ echo "Unknown OS ($OS) -- build aborted"
+fi
diff --git a/bundles/org.eclipse.equinox.executable/library/gtk/build.xml b/bundles/org.eclipse.equinox.executable/library/gtk/build.xml
new file mode 100644
index 000000000..65a05c0ee
--- /dev/null
+++ b/bundles/org.eclipse.equinox.executable/library/gtk/build.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<project default="build_eclipse" basedir=".">
+
+<target name="build_eclipse">
+ <exec dir="." executable="sh">
+ <arg line="${basedir}/build.sh"/>
+ <arg line="install"/>
+ </exec>
+ <eclipse.refreshLocal resource="platform-launcher" depth="infinite" />
+</target>
+
+<target name="build_eclipse_ppc">
+ <exec dir="." executable="sh">
+ <env key="MODEL" value="ppc"/>
+ <arg line="${basedir}/build.sh"/>
+ <arg line="install"/>
+ </exec>
+ <eclipse.refreshLocal resource="platform-launcher" depth="infinite" />
+</target>
+
+<target name="clean">
+ <tstamp/>
+ <exec dir="." executable="sh">
+ <arg line="${basedir}/build.sh"/>
+ <arg line="clean"/>
+ </exec>
+</target>
+
+</project> \ No newline at end of file
diff --git a/bundles/org.eclipse.equinox.executable/library/gtk/eclipseGtk.c b/bundles/org.eclipse.equinox.executable/library/gtk/eclipseGtk.c
new file mode 100644
index 000000000..79c18fbf9
--- /dev/null
+++ b/bundles/org.eclipse.equinox.executable/library/gtk/eclipseGtk.c
@@ -0,0 +1,280 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ * Kevin Cornell (Rational Software Corporation)
+ * Tom Tromey (Red Hat, Inc.)
+ *******************************************************************************/
+
+#include "eclipseMozilla.h"
+#include "eclipseCommon.h"
+#include "eclipseOS.h"
+#include "eclipseUtil.h"
+
+#include <signal.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <sys/ioctl.h>
+#include <dlfcn.h>
+#ifdef SOLARIS
+#include <sys/filio.h>
+#endif
+#include <errno.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <locale.h>
+
+#include <gtk/gtk.h>
+#include <gdk-pixbuf/gdk-pixbuf.h>
+
+/* Global Variables */
+char* consoleVM = "java";
+char* defaultVM = "java";
+char* vmLibrary = "libjvm.so";
+char* shippedVMDir = "jre/bin/";
+
+/* Define the special arguments for the various Java VMs. */
+static char* argVM_JAVA[] = { NULL };
+static char* argVM_J9[] = { "-jit", "-mca:1024", "-mco:1024", "-mn:256", "-mo:4096",
+ "-moi:16384", "-mx:262144", "-ms:16", "-mr:16", NULL };
+
+/* TODO need a better way of doing this*/
+#ifdef i386
+#define JAVA_ARCH "i386"
+#elif defined(__ppc__)
+#define JAVA_ARCH "ppc"
+#endif
+
+#define MAX_LOCATION_LENGTH 20 /* none of the jvmLocations strings should be longer than this */
+static const char* jvmLocations [] = { "j9vm",
+ "classic",
+ "../lib/" JAVA_ARCH "/client",
+ "../lib/" JAVA_ARCH "/server",
+ NULL };
+
+/* Define local variables . */
+static int saveArgc = 0;
+static char** saveArgv = 0;
+static long splashHandle = 0;
+
+/* Local functions */
+static void adjustLibraryPath( char * vmLibrary );
+static char * findLib(char * command);
+
+/* Create and Display the Splash Window */
+int showSplash( const char* featureImage )
+{
+ GtkAdjustment* vadj, *hadj;
+ int width, height;
+ GdkPixbuf * pixbuf;
+ GtkWidget * image;
+ GtkWidget * shellHandle, * vboxHandle, * scrolledHandle, * handle;
+
+ initWindowSystem(&initialArgc, initialArgv, 1);
+
+ shellHandle = gtk_window_new(GTK_WINDOW_POPUP);
+ vboxHandle = gtk_vbox_new(FALSE, 0);
+ if(vboxHandle == 0)
+ return -1;
+
+ vadj = GTK_ADJUSTMENT(gtk_adjustment_new(0, 0, 100, 1, 10, 10));
+ hadj = GTK_ADJUSTMENT(gtk_adjustment_new(0, 0, 100, 1, 10, 10));
+ if (vadj == 0 || hadj == 0)
+ return -1;
+
+ scrolledHandle = gtk_scrolled_window_new(hadj, vadj);
+
+ gtk_container_add(GTK_CONTAINER(vboxHandle), scrolledHandle);
+ gtk_box_set_child_packing(GTK_BOX(vboxHandle), scrolledHandle, TRUE, TRUE, 0, GTK_PACK_END);
+ gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolledHandle), GTK_POLICY_NEVER, GTK_POLICY_NEVER);
+ gtk_widget_show(scrolledHandle);
+
+ handle = gtk_fixed_new();
+ gtk_fixed_set_has_window(GTK_FIXED(handle), TRUE);
+ GTK_WIDGET_SET_FLAGS(handle, GTK_CAN_FOCUS);
+
+ /* TODO Avoid Warnings */
+ gtk_container_add(GTK_CONTAINER(scrolledHandle), handle);
+ gtk_widget_show(handle);
+
+ gtk_container_add(GTK_CONTAINER(shellHandle), vboxHandle);
+
+ pixbuf = gdk_pixbuf_new_from_file(featureImage, NULL);
+ image = gtk_image_new_from_pixbuf(pixbuf);
+ gtk_container_add(GTK_CONTAINER(handle), image);
+ gtk_widget_show(image);
+
+ width = gdk_pixbuf_get_width(pixbuf);
+ height = gdk_pixbuf_get_height(pixbuf);
+ gtk_window_resize(GTK_WINDOW(shellHandle), width, height);
+ gtk_window_set_position(GTK_WINDOW(shellHandle), GTK_WIN_POS_CENTER);
+ gtk_widget_show(shellHandle);
+ gtk_widget_show_all(GTK_WIDGET(shellHandle));
+ splashHandle = (long)G_OBJECT(shellHandle);
+ dispatchMessages();
+ return 0;
+}
+
+void dispatchMessages() {
+ while(g_main_context_iteration(0,0) != 0) {}
+}
+
+long getSplashHandle() {
+ return splashHandle;
+}
+
+void takeDownSplash() {
+ if(splashHandle != 0) {
+ gtk_widget_destroy((GtkWidget*)splashHandle);
+ dispatchMessages();
+ splashHandle = 0;
+ }
+}
+
+/* Get the window system specific VM arguments */
+char** getArgVM( char* vm )
+{
+ char** result;
+ char* version;
+
+ if (isJ9VM( vm ))
+ return argVM_J9;
+
+ /* Use the default arguments for a standard Java VM */
+ result = argVM_JAVA;
+ return result;
+}
+
+char * findVMLibrary( char* command ) {
+ char * lib = findLib(command);
+ if( lib != NULL ) {
+ adjustLibraryPath(lib);
+ }
+ return lib;
+}
+static char * findLib(char * command) {
+ int i;
+ int pathLength;
+ struct stat stats;
+ char * path; /* path to resulting jvm shared library */
+ char * location; /* points to begining of jvmLocations section of path */
+
+ if (command != NULL) {
+ location = strrchr( command, dirSeparator ) + 1;
+
+ /*check first to see if command already points to the library */
+ if (strcmp(location, vmLibrary) == 0) {
+ return command;
+ }
+
+ pathLength = location - command;
+ path = malloc((pathLength + MAX_LOCATION_LENGTH + 1 + strlen(vmLibrary) + 1) * sizeof(char));
+ strncpy(path, command, pathLength);
+ location = &path[pathLength];
+
+ /*
+ * We are trying base/jvmLocations[*]/vmLibrary
+ * where base is the directory containing the given java command, normally jre/bin
+ */
+ i = -1;
+ while(jvmLocations[++i] != NULL) {
+ int length = strlen(jvmLocations[i]);
+ strcpy(location, jvmLocations[i]);
+ location[length] = dirSeparator;
+ location[length + 1] = 0;
+ strcat(location, vmLibrary);
+ if (stat( path, &stats ) == 0 && (stats.st_mode & S_IFREG) != 0)
+ { /* found it */
+ return path;
+ }
+ }
+ }
+ return NULL;
+}
+
+/* adjust the LD_LIBRARY_PATH for the vmLibrary */
+static void adjustLibraryPath( char * vmLibrary ) {
+ char * buffer;
+ char * path;
+ char * c;
+ char * vmPath;
+ char * vmParent;
+ char * ldPath;
+ char * newPath;
+ int vmPathFound = 0;
+ int vmParentFound = 0;
+ int ldPathLength = 0;
+
+#ifdef MOZILLA_FIX
+ fixEnvForMozilla();
+#endif /* MOZILLA_FIX */
+
+ /* we want the directory containing the library, and the parent directory of that */
+ buffer = strdup(vmLibrary);
+ c = strrchr(buffer, dirSeparator);
+ *c = 0;
+ vmPath = strdup(buffer);
+
+ c = strrchr(buffer, dirSeparator);
+ *c = 0;
+ vmParent = strdup(buffer);
+ free(buffer);
+
+ ldPath = (char*)getenv("LD_LIBRARY_PATH");
+ if(!ldPath)
+ ldPath = "";
+ buffer = malloc((strlen(ldPath) + 2) * sizeof(char));
+ strcpy(buffer, ldPath);
+ strcat(buffer, ":");
+ path = buffer;
+ while( (c = strchr(path, pathSeparator)) != NULL ) {
+ *c++ = 0;
+ if( !vmPathFound && strcmp(path, vmPath) == 0 ) {
+ vmPathFound = 1;
+ } else if( !vmParentFound && strcmp(path, vmParent) == 0 ) {
+ vmParentFound = 1;
+ }
+ if(vmPathFound && vmParentFound)
+ break;
+ path = c;
+ }
+ free(buffer);
+
+ if( vmPathFound && vmParentFound ){
+ /*found both on the LD_LIBRARY_PATH, don't need to set it */
+ return;
+ }
+
+ /* set the value for LD_LIBRARY_PATH */
+ ldPathLength = strlen(ldPath);
+ /* ldPath + separator + vmPath + separator + vmParent + NULL */
+ newPath = malloc((ldPathLength + 1 + strlen(vmPath) + 1 + strlen(vmParent) + 1) * sizeof(char));
+ strcpy(newPath, vmPath);
+ strncat(newPath, &pathSeparator, 1);
+ strcat(newPath, vmParent);
+ strncat(newPath, &pathSeparator, 1);
+ strcat(newPath, ldPath);
+ setenv( "LD_LIBRARY_PATH", newPath, 1);
+
+ free(vmPath);
+ free(vmParent);
+
+ /* now we must restart for this to take affect */
+ /* TODO what args do we restart with? */
+ execv(initialArgv[0], initialArgv);
+}
+
+void restartLauncher( char* program, char* args[] )
+{
+ /* just restart in-place */
+ execv(program, args);
+}
+
diff --git a/bundles/org.eclipse.equinox.executable/library/gtk/eclipseGtkCommon.c b/bundles/org.eclipse.equinox.executable/library/gtk/eclipseGtkCommon.c
new file mode 100644
index 000000000..04ce569ab
--- /dev/null
+++ b/bundles/org.eclipse.equinox.executable/library/gtk/eclipseGtkCommon.c
@@ -0,0 +1,98 @@
+/*******************************************************************************
+ * Copyright (c) 2006 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ * Andrew Niefer
+ *******************************************************************************/
+
+#include "eclipseCommon.h"
+#include "eclipseOS.h"
+
+#include <locale.h>
+#include <dlfcn.h>
+#include <gtk/gtk.h>
+
+#define ECLIPSE_ICON 401
+
+char dirSeparator = '/';
+char pathSeparator = ':';
+
+void initWindowSystem( int* pArgc, _TCHAR* argv[], int showSplash );
+
+/* Global Main Window*/
+/*#ifdef UNICODE
+extern HWND topWindow;
+#else
+HWND topWindow = 0;
+#endif*/
+
+/* Define local variables for the main window. */
+static int saveArgc = 0; /* arguments after they were parsed, for window system */
+static char** saveArgv = 0;
+
+gboolean gtkInitialized = FALSE;
+
+/* Display a Message */
+void displayMessage(char* title, char* message)
+{
+ GtkWidget* dialog;
+
+ /* If GTK has not been initialized yet, do it now. */
+ if (!gtkInitialized)
+ {
+ initWindowSystem( &saveArgc, saveArgv, 1 );
+ }
+
+ dialog = gtk_message_dialog_new(NULL, GTK_DIALOG_DESTROY_WITH_PARENT,
+ GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE,
+ "%s", message);
+ gtk_window_set_title(GTK_WINDOW (dialog), title);
+ gtk_dialog_run(GTK_DIALOG (dialog));
+ gtk_widget_destroy(dialog);
+}
+
+/* Initialize the Window System */
+void initWindowSystem(int* pArgc, char* argv[], int showSplash)
+{
+ if(gtkInitialized)
+ return;
+ /* Save the arguments in case displayMessage() is called in the main launcher. */
+ if (saveArgv == 0)
+ {
+ saveArgc = *pArgc;
+ saveArgv = argv;
+ }
+
+ /* Initialize GTK. */
+ gtk_set_locale();
+ gtk_init_check(pArgc, &argv);
+ gdk_set_program_class(officialName);
+ gtkInitialized = TRUE;
+}
+
+/* Load the specified shared library
+ */
+void * loadLibrary( char * library ){
+ void * result= dlopen(library, RTLD_LAZY);
+ if(result == 0)
+ printf("%s\n",dlerror());
+ return result;
+}
+
+/* Unload the shared library
+ */
+void unloadLibrary( void * handle ){
+ dlclose(handle);
+}
+
+/* Find the given symbol in the shared library
+ */
+void * findSymbol( void * handle, char * symbol ){
+ return dlsym(handle, symbol);
+}
+
diff --git a/bundles/org.eclipse.equinox.executable/library/gtk/make_linux.mak b/bundles/org.eclipse.equinox.executable/library/gtk/make_linux.mak
new file mode 100644
index 000000000..f5ba7ce8b
--- /dev/null
+++ b/bundles/org.eclipse.equinox.executable/library/gtk/make_linux.mak
@@ -0,0 +1,92 @@
+#*******************************************************************************
+# Copyright (c) 2000, 2005 IBM Corporation and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# IBM Corporation - initial API and implementation
+# Kevin Cornell (Rational Software Corporation)
+# Tom Tromey (Red Hat, Inc.)
+#*******************************************************************************
+
+# Makefile for creating the GTK eclipse launcher program.
+#
+# This makefile expects the utility "pkg-config" to be in the PATH.
+
+# This makefile expects the following environment variables set:
+#
+# PROGRAM_OUTPUT - the filename of the output executable
+# DEFAULT_OS - the default value of the "-os" switch
+# DEFAULT_OS_ARCH - the default value of the "-arch" switch
+# DEFAULT_WS - the default value of the "-ws" switch
+# JAVA_JNI
+#default value for PROGRAM_OUTPUT
+ifeq ($(PROGRAM_OUTPUT),)
+ PROGRAM_OUTPUT=eclipse
+endif
+ifeq ($(PROGRAM_LIBRARY),)
+ PROGRAM_LIBRARY=$(PROGRAM_OUTPUT)_001.so
+endif
+
+# Define the object modules to be compiled and flags.
+CC=gcc
+MAIN_OBJS = eclipseMain.o
+COMMON_OBJS = eclipseConfig.o eclipseCommon.o eclipseGtkCommon.o
+DLL_OBJS = eclipse.o eclipseGtk.o eclipseUtil.o eclipseJNI.o eclipseMozilla.o
+
+EXEC = $(PROGRAM_OUTPUT)
+DLL = $(PROGRAM_LIBRARY)
+LIBS = `pkg-config --libs-only-L gtk+-2.0` -lgtk-x11-2.0 -lgdk_pixbuf-2.0 -lgobject-2.0 -lgdk-x11-2.0 -lpthread
+LFLAGS = -shared -fpic -Wl,--export-dynamic
+CFLAGS = -g \
+ -fpic \
+ -DLINUX \
+ -DMOZILLA_FIX \
+ -DDEFAULT_OS="\"$(DEFAULT_OS)\"" \
+ -DDEFAULT_OS_ARCH="\"$(DEFAULT_OS_ARCH)\"" \
+ -DDEFAULT_WS="\"$(DEFAULT_WS)\"" \
+ -I. \
+ -I.. \
+ -I$(JAVA_JNI) \
+ `pkg-config --cflags gtk+-2.0`
+
+all: $(EXEC) $(DLL)
+
+eclipse.o: ../eclipse.c ../eclipseOS.h ../eclipseCommon.h ../eclipseJNI.h
+ $(CC) $(CFLAGS) -c ../eclipse.c -o eclipse.o
+
+eclipseMain.o: ../eclipseUnicode.h ../eclipseCommon.h ../eclipseMain.c
+ $(CC) $(CFLAGS) -c ../eclipseMain.c -o eclipseMain.o
+
+eclipseCommon.o: ../eclipseCommon.h ../eclipseUnicode.h ../eclipseCommon.c
+ $(CC) $(CFLAGS) -c ../eclipseCommon.c
+
+eclipseGtkCommon.o: ../eclipseCommon.h ../eclipseOS.h eclipseGtkCommon.c
+ $(CC) $(CFLAGS) -c eclipseGtkCommon.c -o eclipseGtkCommon.o
+
+eclipseUtil.o: ../eclipseUtil.c ../eclipseUtil.h ../eclipseOS.h
+ $(CC) $(CFLAGS) -c ../eclipseUtil.c -o eclipseUtil.o
+
+eclipseJNI.o: ../eclipseJNI.c ../eclipseCommon.h ../eclipseOS.h ../eclipseJNI.h
+ $(CC) $(CFLAGS) -c ../eclipseJNI.c -o eclipseJNI.o
+
+eclipseConfig.o: ../eclipseConfig.c ../eclipseConfig.h ../eclipseOS.h
+ $(CC) $(CFLAGS) -c ../eclipseConfig.c -o eclipseConfig.o
+
+eclipseMozilla.o: ../eclipseMozilla.c ../eclipseMozilla.h ../eclipseOS.h
+ $(CC) $(CFLAGS) -c ../eclipseMozilla.c -o eclipseMozilla.o
+
+$(EXEC): $(MAIN_OBJS) $(COMMON_OBJS)
+ $(CC) -o $(EXEC) $(MAIN_OBJS) $(COMMON_OBJS) $(LIBS)
+
+$(DLL): $(DLL_OBJS) $(COMMON_OBJS)
+ $(CC) $(LFLAGS) -o $(DLL) $(DLL_OBJS) $(COMMON_OBJS) $(LIBS)
+
+install: all
+ cp $(EXEC) $(DLL) $(OUTPUT_DIR)
+ rm -f $(EXEC) $(DLL) $(MAIN_OBJS) $(COMMON_OBJS) $(DLL_OBJS)
+
+clean:
+ rm -f $(EXEC) $(MAIN_OBJS) $(COMMON_OBJS) $(DLL_OBJS)
diff --git a/bundles/org.eclipse.equinox.executable/library/gtk/make_solaris.mak b/bundles/org.eclipse.equinox.executable/library/gtk/make_solaris.mak
new file mode 100644
index 000000000..9937e6903
--- /dev/null
+++ b/bundles/org.eclipse.equinox.executable/library/gtk/make_solaris.mak
@@ -0,0 +1,79 @@
+#*******************************************************************************
+# Copyright (c) 2000, 2005 IBM Corporation and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# IBM Corporation - initial API and implementation
+# Kevin Cornell (Rational Software Corporation)
+# Tom Tromey (Red Hat, Inc.)
+#*******************************************************************************
+
+# Makefile for creating the GTK eclipse launcher program.
+#
+# This makefile expects the utility "pkg-config" to be in the PATH.
+
+# This makefile expects the following environment variables set:
+#
+# PROGRAM_OUTPUT - the filename of the output executable
+# DEFAULT_OS - the default value of the "-os" switch
+# DEFAULT_OS_ARCH - the default value of the "-arch" switch
+# DEFAULT_WS - the default value of the "-ws" switch
+# JAVA_JNI - the directory containing the Java JNI headers
+# Define the object modules to be compiled and flags.
+MAIN_OBJS = eclipseMain.o
+COMMON_OBJS = eclipseConfig.o eclipseCommon.o eclipseGtkCommon.o
+DLL_OBJS = eclipse.o eclipseGtk.o eclipseUtil.o eclipseJNI.o
+
+EXEC = $(PROGRAM_OUTPUT)
+DLL = $(PROGRAM_LIBRARY)
+LIBS = `pkg-config --libs-only-L gtk+-2.0` -lgtk-x11-2.0 -lgdk_pixbuf-2.0 -lgobject-2.0 -lgdk-x11-2.0 -lglib-2.0 -lpthread
+LFLAGS = -shared -Wl--export-dynamic
+CFLAGS = -O -s \
+ -DSOLARIS \
+ -K PIC \
+ -DDEFAULT_OS="\"$(DEFAULT_OS)\"" \
+ -DDEFAULT_OS_ARCH="\"$(DEFAULT_OS_ARCH)\"" \
+ -DDEFAULT_WS="\"$(DEFAULT_WS)\"" \
+ -I. \
+ -I.. \
+ -I$(JAVA_JNI) \
+ `pkg-config --cflags gtk+-2.0`
+
+all: $(EXEC)
+
+eclipse.o: ../eclipse.c ../eclipseOS.h ../eclipseCommon.h ../eclipseJNI.h
+ $(CC) $(CFLAGS) -c ../eclipse.c -o eclipse.o
+
+eclipseMain.o: ../eclipseUnicode.h ../eclipseCommon.h ../eclipseMain.c
+ $(CC) $(CFLAGS) -c ../eclipseMain.c -o eclipseMain.o
+
+eclipseCommon.o: ../eclipseCommon.h ../eclipseUnicode.h ../eclipseCommon.c
+ $(CC) $(CFLAGS) -c ../eclipseCommon.c
+
+eclipseGtkCommon.o: ../eclipseCommon.h ../eclipseOS.h eclipseGtkCommon.c
+ $(CC) $(CFLAGS) -c eclipseGtkCommon.c -o eclipseGtkCommon.o
+
+eclipseUtil.o: ../eclipseUtil.c ../eclipseUtil.h ../eclipseOS.h
+ $(CC) $(CFLAGS) -c ../eclipseUtil.c -o eclipseUtil.o
+
+eclipseJNI.o: ../eclipseJNI.c ../eclipseCommon.h ../eclipseOS.h ../eclipseJNI.h
+ $(CC) $(CFLAGS) -c ../eclipseJNI.c -o eclipseJNI.o
+
+eclipseConfig.o: ../eclipseConfig.c ../eclipseConfig.h ../eclipseOS.h
+ $(CC) $(CFLAGS) -c ../eclipseConfig.c -o eclipseConfig.o
+
+$(EXEC): $(MAIN_OBJS) $(COMMON_OBJS)
+ $(CC) -o $(EXEC) $(MAIN_OBJS) $(COMMON_OBJS) $(LIBS)
+
+$(DLL): $(DLL_OBJS) $(COMMON_OBJS)
+ $(CC) $(LFLAGS) -o $(DLL) $(DLL_OBJS) $(COMMON_OBJS) $(LIBS)
+
+install: all
+ cp $(EXEC) $(DLL) $(OUTPUT_DIR)
+ rm -f $(EXEC) $(DLL) $(MAIN_OBJS) $(COMMON_OBJS) $(DLL_OBJS)
+
+clean:
+ rm -f $(EXEC) $(DLL) $(MAIN_OBJS) $(COMMON_OBJS) $(DLL_OBJS)

Back to the top