This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Makefile & platform specific sources


The PLATFORM_SPECIFIC_SOURCES thing didn't set up dependencies properly 
so I've changed it to PLATFORMOBJS instead, which works the same way as 
GCOBJS and THREADOBJS already do. I also set things up to link posix.h 
or win32.h to platform.h. This way generic files can just include 
platform.h to get the platform-specific implementations, and those 
implementations can be inlined in the .h file if desired.

There's a few other places where posix.h could be changed to platoform.h 
if needed.

regards

Bryce.


Index: Makefile.am
===================================================================
RCS file: /cvs/gcc/egcs/libjava/Makefile.am,v
retrieving revision 1.197
diff -u -r1.197 Makefile.am
--- Makefile.am	2002/02/05 02:08:16	1.197
+++ Makefile.am	2002/02/06 01:40:39
@@ -123,16 +123,17 @@
 	$(built_java_source_files:.java=.lo)
 x_javao_files = $(x_java_source_files:.java=.lo)
 
-libgcj_la_SOURCES = prims.cc $(PLATFORM_SPECIFIC_SOURCES) jni.cc exception.cc \
+libgcj_la_SOURCES = prims.cc jni.cc exception.cc \
 	resolve.cc defineclass.cc interpret.cc name-finder.cc verify.cc \
 	$(nat_source_files)
 EXTRA_libgcj_la_SOURCES = boehm.cc nogc.cc posix-threads.cc no-threads.cc \
+	win32-threads.cc posix.cc win32.cc \
 	$(c_source_files) $(java_source_files) $(built_java_source_files)
 libgcj_la_DEPENDENCIES = libgcj.jar $(javao_files) \
-	$(c_files) $(GCOBJS) $(THREADOBJS) $(LIBLTDL)
+	$(c_files) $(GCOBJS) $(THREADOBJS) $(PLATFORMOBJS) $(LIBLTDL)
 
 libgcj_la_LIBADD = $(javao_files) $(c_files) $(GCOBJS) \
-	$(THREADOBJS)
+	$(THREADOBJS) $(PLATFORMOBJS)
 # Include THREADLIBS here to ensure that the correct version of
 # certain linuxthread functions get linked:
 libgcj_la_LDFLAGS = -rpath $(toolexeclibdir) $(THREADLIBS) $(LIBLTDL) \
Index: configure.in
===================================================================
RCS file: /cvs/gcc/egcs/libjava/configure.in,v
retrieving revision 1.108
diff -u -r1.108 configure.in
--- configure.in	2002/02/05 02:08:14	1.108
+++ configure.in	2002/02/06 01:40:41
@@ -193,27 +193,30 @@
 TARGET_ECOS="$with_ecos"
 )
 
-PLATFORM_SPECIFIC_SOURCES=
+PLATFORMOBJS=
 case "$TARGET_ECOS" in
    no) case "$host" in
       mingw)
             PLATFORM=Win32
-            PLATFORM_SPECIFIC_SOURCES=win32.cc
+            PLATFORMOBJS=win32.lo
+	    PLATFORMH=win32.h
       ;;
       *)
             PLATFORM=Posix
-            PLATFORM_SPECIFIC_SOURCES=posix.cc
+            PLATFORMOBJS=posix.lo
+	    PLATFORMH=posix.h
       ;;
       esac
       ;;
    *)
       PLATFORM=Ecos
       AC_DEFINE(ECOS)
-      PLATFORM_SPECIFIC_SOURCES=posix.cc
+      PLATFORMOBJS=posix.lo
+      PLATFORMH=posix.h
       ;;
 esac
-AC_SUBST(PLATFORM_SPECIFIC_SOURCES)
-
+AC_SUBST(PLATFORMOBJS)
+AC_LINK_FILES(include/$PLATFORMH, include/platform.h)
 
 AC_EGREP_HEADER(uint32_t, stdint.h, AC_DEFINE(HAVE_INT32_DEFINED))
 AC_EGREP_HEADER(uint32_t, inttypes.h, AC_DEFINE(HAVE_INT32_DEFINED))
Index: java/lang/natSystem.cc
===================================================================
RCS file: /cvs/gcc/egcs/libjava/java/lang/natSystem.cc,v
retrieving revision 1.44
diff -u -r1.44 natSystem.cc
--- natSystem.cc	2002/01/11 23:00:58	1.44
+++ natSystem.cc	2002/02/06 01:40:42
@@ -14,7 +14,7 @@
 #include <string.h>
 #include <stdlib.h>
 
-#include "posix.h"
+#include "platform.h"
 
 #ifdef HAVE_PWD_H
 #include <pwd.h>

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]