$OpenBSD: patch-plugins_org_eclipse_swt_Eclipse_SWT_PI_gtk_library_make_openbsd_mak,v 1.6 2007/04/06 02:16:21 kurt Exp $
--- plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/make_openbsd.mak.orig	Thu Apr  5 08:12:42 2007
+++ plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/make_openbsd.mak	Thu Apr  5 08:59:10 2007
@@ -30,18 +30,18 @@ PROFILE17_PREFIX = swt-mozilla17-profile$(GCC_VERSION)
 PROFILE18_PREFIX = swt-mozilla18-profile$(GCC_VERSION)
 GLX_PREFIX = swt-glx
 
-SWT_LIB = lib$(SWT_PREFIX)-$(WS_PREFIX)-$(SWT_VERSION).so
-CDE_LIB = lib$(CDE_PREFIX)-$(WS_PREFIX)-$(SWT_VERSION).so
-AWT_LIB = lib$(AWT_PREFIX)-$(WS_PREFIX)-$(SWT_VERSION).so
-SWTPI_LIB = lib$(SWTPI_PREFIX)-$(WS_PREFIX)-$(SWT_VERSION).so
-CAIRO_LIB = lib$(CAIRO_PREFIX)-$(WS_PREFIX)-$(SWT_VERSION).so
-ATK_LIB = lib$(ATK_PREFIX)-$(WS_PREFIX)-$(SWT_VERSION).so
-GNOME_LIB = lib$(GNOME_PREFIX)-$(WS_PREFIX)-$(SWT_VERSION).so
-MOZILLA_LIB = lib$(MOZILLA_PREFIX)-$(WS_PREFIX)-$(SWT_VERSION).so
+SWT_LIB = lib$(SWT_PREFIX)-$(WS_PREFIX)-$(SWT_VERSION).so.$(LIBswt_gtk_VERSION)
+CDE_LIB = lib$(CDE_PREFIX)-$(WS_PREFIX)-$(SWT_VERSION).so.$(LIBswt_cde_gtk_VERSION)
+AWT_LIB = lib$(AWT_PREFIX)-$(WS_PREFIX)-$(SWT_VERSION).so.$(LIBswt_awt_gtk_VERSION)
+SWTPI_LIB = lib$(SWTPI_PREFIX)-$(WS_PREFIX)-$(SWT_VERSION).so.$(LIBswt_pi_gtk_VERSION)
+CAIRO_LIB = lib$(CAIRO_PREFIX)-$(WS_PREFIX)-$(SWT_VERSION).so.$(LIBswt_cairo_gtk_VERSION)	
+ATK_LIB = lib$(ATK_PREFIX)-$(WS_PREFIX)-$(SWT_VERSION).so.$(LIBswt_atk_gtk_VERSION)
+GNOME_LIB = lib$(GNOME_PREFIX)-$(WS_PREFIX)-$(SWT_VERSION).so.$(LIBswt_gnome_gtk_VERSION)
+MOZILLA_LIB = lib$(MOZILLA_PREFIX)-$(WS_PREFIX)-$(SWT_VERSION).so.$(LIBswt_mozilla_gtk_VERSION)
 PROFILE14_LIB = lib$(PROFILE14_PREFIX)-$(WS_PREFIX)-$(SWT_VERSION).so
 PROFILE17_LIB = lib$(PROFILE17_PREFIX)-$(WS_PREFIX)-$(SWT_VERSION).so
 PROFILE18_LIB = lib$(PROFILE18_PREFIX)-$(WS_PREFIX)-$(SWT_VERSION).so
-GLX_LIB = lib$(GLX_PREFIX)-$(WS_PREFIX)-$(SWT_VERSION).so
+GLX_LIB = lib$(GLX_PREFIX)-$(WS_PREFIX)-$(SWT_VERSION).so.$(LIBswt_glx_gtk_VERSION)
 
 CAIROCFLAGS = `pkg-config --cflags cairo`
 CAIROLIBS = `pkg-config --libs-only-L cairo` -lcairo
@@ -80,7 +80,7 @@ MOZILLACFLAGS = -O \
 	-I$(JAVA_HOME)/include \
 	-I$(JAVA_HOME)/include/openbsd \
 	${SWT_PTR_CFLAGS}
-MOZILLALIBS = -shared -s -Wl,--version-script=mozilla_exports -Bsymbolic
+MOZILLALIBS = -shared -fPIC -s -Wl,--version-script=mozilla_exports -Bsymbolic
 	
 SWT_OBJECTS = swt.o callback.o
 CDE_OBJECTS = swt.o cde.o cde_structs.o cde_stats.o
@@ -101,12 +101,13 @@ CFLAGS = -O -Wall \
 		-DLINUX -DGTK \
 		-I$(JAVA_HOME)/include \
 		-I$(JAVA_HOME)/include/openbsd \
+		-I/usr/X11R6/include/ \
 		-fPIC \
 		${SWT_PTR_CFLAGS}
 LIBS = -shared -fPIC -s
 
 
-all: make_swt make_atk make_gnome make_glx
+all: make_swt make_atk make_gnome make_glx make_mozilla
 
 #
 # SWT libs
@@ -202,7 +203,7 @@ gnome_stats.o: gnome_stats.c gnome_stats.h
 #
 # Mozilla lib
 #
-make_mozilla:$(MOZILLA_LIB) $(PROFILE14_LIB) $(PROFILE17_LIB) $(PROFILE18_LIB)
+make_mozilla:$(MOZILLA_LIB)
 
 $(MOZILLA_LIB): $(MOZILLA_OBJECTS)
 	$(CXX) -o $(MOZILLA_LIB) $(MOZILLA_OBJECTS) $(MOZILLALIBS) ${GECKO_LIBS}
@@ -220,22 +221,22 @@ xpcom_stats.o: xpcom_stats.cpp
 	$(CXX) $(MOZILLACFLAGS) ${GECKO_INCLUDES} -c xpcom_stats.cpp	
 
 $(PROFILE14_OBJECTS): xpcom_profile.cpp
-	$(CXX) -o $(PROFILE14_OBJECTS) $(MOZILLACFLAGS) ${PROFILE14_INCLUDES} -c xpcom_profile.cpp	
+	$(CXX) -o $(PROFILE14_OBJECTS) $(MOZILLACFLAGS) ${PROFILE14_INCLUDES} ${GECKO_INCLUDES} -c xpcom_profile.cpp	
 
 $(PROFILE17_OBJECTS): xpcom_profile.cpp
-	$(CXX) -o $(PROFILE17_OBJECTS) $(MOZILLACFLAGS) ${PROFILE17_INCLUDES} -c xpcom_profile.cpp	
+	$(CXX) -o $(PROFILE17_OBJECTS) $(MOZILLACFLAGS) ${PROFILE17_INCLUDES} ${GECKO_INCLUDES} -c xpcom_profile.cpp	
 
 $(PROFILE18_OBJECTS): xpcom_profile.cpp
-	$(CXX) -o $(PROFILE18_OBJECTS) $(MOZILLACFLAGS) ${PROFILE18_INCLUDES} -c xpcom_profile.cpp	
+	$(CXX) -o $(PROFILE18_OBJECTS) $(MOZILLACFLAGS) ${PROFILE18_INCLUDES} ${GECKO_INCLUDES} -c xpcom_profile.cpp	
 
 $(PROFILE14_LIB): $(PROFILE14_OBJECTS)
-	$(CXX) -o $(PROFILE14_LIB) $(PROFILE14_OBJECTS) $(MOZILLALIBS) ${PROFILE14_LIBS}
+	$(CXX) -o $(PROFILE14_LIB) $(PROFILE14_OBJECTS) $(MOZILLALIBS) ${PROFILE14_LIBS} ${GECKO_LIBS}
 
 $(PROFILE17_LIB): $(PROFILE17_OBJECTS)
-	$(CXX) -o $(PROFILE17_LIB) $(PROFILE17_OBJECTS) $(MOZILLALIBS) ${PROFILE17_LIBS}
+	$(CXX) -o $(PROFILE17_LIB) $(PROFILE17_OBJECTS) $(MOZILLALIBS) ${PROFILE17_LIBS} ${GECKO_LIBS}
 
 $(PROFILE18_LIB): $(PROFILE18_OBJECTS)
-	$(CXX) -o $(PROFILE18_LIB) $(PROFILE18_OBJECTS) $(MOZILLALIBS) ${PROFILE18_LIBS}
+	$(CXX) -o $(PROFILE18_LIB) $(PROFILE18_OBJECTS) $(MOZILLALIBS) ${PROFILE18_LIBS} ${GECKO_LIBS}
 
 #
 # GLX lib
@@ -258,10 +259,10 @@ glx_stats.o: glx_stats.c glx_stats.h
 # Install
 #
 install: all
-	cp *.so $(OUTPUT_DIR)
+	cp *.so.* $(OUTPUT_DIR)
 
 #
 # Clean
 #
 clean:
-	rm -f *.o *.so
+	rm -f *.o *.so.*
