Author: [EMAIL PROTECTED]
Date: Wed Dec 3 17:11:00 2008
New Revision: 4244
Added:
changes/jat/oophm-plugins-trunk/plugins/config.mk
Removed:
changes/jat/oophm-plugins-trunk/plugins/common/Makefile.mac
Modified:
changes/jat/oophm-plugins-trunk/plugins/common/Makefile
Log:
Commit missing files from previous commit to change branch.
Modified: changes/jat/oophm-plugins-trunk/plugins/common/Makefile
==============================================================================
--- changes/jat/oophm-plugins-trunk/plugins/common/Makefile (original)
+++ changes/jat/oophm-plugins-trunk/plugins/common/Makefile Wed Dec 3
17:11:00 2008
@@ -1,10 +1,4 @@
-# Set to classpath value to get GWT classes from
-#GWTDEV=../build/staging/gwt-linux-0.0.0/gwt-dev-linux.jar
-GWTDEV=../eclipse/dev/linux/bin
-
-INC=-I..
-CFLAGS=-Wall -g -O2 -fPIC $(INC) -rdynamic
-CXXFLAGS=$(CFLAGS)
+include ../config.mk
HDRS= HostChannel.h InvokeMessage.h LoadModuleMessage.h Message.h \
ReturnMessage.h Value.h BrowserChannel.h Debug.h DebugLevel.h \
@@ -12,88 +6,74 @@
LoadJsniMessage.h InvokeSpecialMessage.h FreeValueMessage.h \
ByteOrder.h
-OBJS= HostChannel.o LoadModuleMessage.o InvokeMessage.o \
- ReturnMessage.o ServerMethods.o Debug.o Socket.o \
- AllowedConnections.o LoadJsniMessage.o InvokeSpecialMessage.o \
- FreeValueMessage.o
-
SRCS= HostChannel.cpp LoadModuleMessage.cpp InvokeMessage.cpp \
ReturnMessage.cpp ServerMethods.cpp Debug.cpp Socket.cpp \
AllowedConnections.cpp LoadJsniMessage.cpp InvokeSpecialMessage.cpp \
FreeValueMessage.cpp
-OBJ32= $(patsubst %.cpp,obj32/%.o,$(SRCS))
-OBJ64= $(patsubst %.cpp,obj64/%.o,$(SRCS))
-
-#all:: libcommon32.a libcommon64.a
-all:: libcommon32.a
-
-libcommon32.a: $(OBJ32) obj32.dir
- ar -rv $@ $(OBJ32)
+LIBCOMMON= libcommon$(FLAG32BIT).a
+OBJDIR= obj$(FLAG32BIT)
+OBJS= $(patsubst %.cpp,$(OBJDIR)/%.o,$(SRCS))
-libcommon64.a: $(OBJ64) obj64.dir
- ar -rv $@ $(OBJ64)
+all:: $(OBJDIR) $(LIBCOMMON)
-obj32.dir:
- -mkdir obj32
- touch obj32.dir
+$(OBJDIR):
+ -mkdir $@
-obj64.dir:
- -mkdir obj64
- touch obj64.dir
+$(LIBCOMMON): $(OBJS)
+ $(AR) $(ARFLAGS) $@ $(OBJS)
-obj32/%.o: %.cpp obj32.dir
- $(CXX) $(CXXFLAGS) -m32 -c $< -o $@
-
-obj64/%.o: %.cpp obj64.dir
- $(CXX) $(CXXFLAGS) -m64 -c $< -o $@
+$(OBJDIR)/%.o: %.cpp
+ $(CXX) $(CXXFLAGS) -c $< -o $@
.PHONY: clean depend testdebug
testdebug:
(cd testing; CXX=$(CXX) CXXFLAGS="$(CFLAGS) -m32" ./testdebug)
(cd testing; CXX=$(CXX) CXXFLAGS="$(CFLAGS) -m64" ./testdebug)
+
clean:
- rm $(OBJ32) $(OBJ64) libcommon32.a libcommon64.a
+ rm -rf obj32 obj64 libcommon32.a libcommon64.a
depend:
g++ -MM $(CFLAGS) $(SRCS) >>Makefile
# makedepend -- $(CFLAGS) -- $(SRCS)
# DO NOT DELETE
-obj32/HostChannel.o obj64/HostChannel.o: HostChannel.cpp Debug.h
Platform.h \
- DebugLevel.h FreeValueMessage.h Message.h BrowserChannel.h HostChannel.h
\
+HostChannel.o: HostChannel.cpp Debug.h Platform.h DebugLevel.h \
+ ByteOrder.h FreeValueMessage.h Message.h BrowserChannel.h HostChannel.h \
Socket.h AllowedConnections.h ReturnMessage.h Value.h SessionHandler.h \
LoadJsniMessage.h InvokeMessage.h InvokeSpecialMessage.h QuitMessage.h \
scoped_ptr/scoped_ptr.h
-obj32/LoadModuleMessage.o obj64/LoadModuleMessage.o: LoadModuleMessage.cpp
Debug.h Platform.h \
+LoadModuleMessage.o: LoadModuleMessage.cpp Debug.h Platform.h \
DebugLevel.h LoadModuleMessage.h Message.h BrowserChannel.h \
- HostChannel.h Socket.h AllowedConnections.h ReturnMessage.h Value.h \
- SessionHandler.h scoped_ptr/scoped_ptr.h
-obj32/InvokeMessage.o obj64/InvokeMessage.o: InvokeMessage.cpp
InvokeMessage.h Message.h \
+ HostChannel.h ByteOrder.h Socket.h AllowedConnections.h ReturnMessage.h \
+ Value.h SessionHandler.h scoped_ptr/scoped_ptr.h
+InvokeMessage.o: InvokeMessage.cpp InvokeMessage.h Message.h \
BrowserChannel.h Value.h Debug.h Platform.h DebugLevel.h HostChannel.h \
- Socket.h AllowedConnections.h ReturnMessage.h SessionHandler.h \
- scoped_ptr/scoped_ptr.h
-obj32/ReturnMessage.o obj64/ReturnMessage.o: ReturnMessage.cpp
ReturnMessage.h Message.h \
+ ByteOrder.h Socket.h AllowedConnections.h ReturnMessage.h \
+ SessionHandler.h scoped_ptr/scoped_ptr.h
+ReturnMessage.o: ReturnMessage.cpp ReturnMessage.h Message.h \
BrowserChannel.h Value.h Debug.h Platform.h DebugLevel.h HostChannel.h \
- Socket.h AllowedConnections.h SessionHandler.h
-obj32/ServerMethods.o obj64/ServerMethods.o: ServerMethods.cpp Debug.h
Platform.h DebugLevel.h \
- FreeValueMessage.h Message.h BrowserChannel.h HostChannel.h Socket.h \
- AllowedConnections.h ReturnMessage.h Value.h SessionHandler.h \
+ ByteOrder.h Socket.h AllowedConnections.h SessionHandler.h
+ServerMethods.o: ServerMethods.cpp Debug.h Platform.h DebugLevel.h \
+ FreeValueMessage.h Message.h BrowserChannel.h HostChannel.h ByteOrder.h \
+ Socket.h AllowedConnections.h ReturnMessage.h Value.h SessionHandler.h \
InvokeMessage.h InvokeSpecialMessage.h ServerMethods.h \
scoped_ptr/scoped_ptr.h
-obj32/Debug.o obj64/Debug.o: Debug.cpp Debug.h Platform.h DebugLevel.h
-obj32/Socket.o obj64/Socket.o: Socket.cpp Platform.h Socket.h Debug.h
DebugLevel.h
-obj32/AllowedConnections.o obj64/AllowedConnections.o:
AllowedConnections.cpp Debug.h Platform.h \
+Debug.o: Debug.cpp Debug.h Platform.h DebugLevel.h
+Socket.o: Socket.cpp Platform.h Socket.h Debug.h DebugLevel.h
+AllowedConnections.o: AllowedConnections.cpp Debug.h Platform.h \
DebugLevel.h AllowedConnections.h
-obj32/LoadJsniMessage.o obj64/LoadJsniMessage.o: LoadJsniMessage.cpp
LoadJsniMessage.h Message.h \
- BrowserChannel.h HostChannel.h Debug.h Platform.h DebugLevel.h Socket.h \
- AllowedConnections.h ReturnMessage.h Value.h SessionHandler.h
-obj32/InvokeSpecialMessage.o obj64/InvokeSpecialMessage.o:
InvokeSpecialMessage.cpp InvokeSpecialMessage.h \
+LoadJsniMessage.o: LoadJsniMessage.cpp LoadJsniMessage.h Message.h \
+ BrowserChannel.h HostChannel.h Debug.h Platform.h DebugLevel.h \
+ ByteOrder.h Socket.h AllowedConnections.h ReturnMessage.h Value.h \
+ SessionHandler.h
+InvokeSpecialMessage.o: InvokeSpecialMessage.cpp InvokeSpecialMessage.h \
Message.h BrowserChannel.h SessionHandler.h Value.h Debug.h Platform.h \
- DebugLevel.h HostChannel.h Socket.h AllowedConnections.h \
+ DebugLevel.h HostChannel.h ByteOrder.h Socket.h AllowedConnections.h \
ReturnMessage.h scoped_ptr/scoped_ptr.h
-obj32/FreeValueMessage.o obj64/FreeValueMessage.o: FreeValueMessage.cpp
FreeValueMessage.h Message.h \
- BrowserChannel.h HostChannel.h Debug.h Platform.h DebugLevel.h Socket.h \
- AllowedConnections.h ReturnMessage.h Value.h SessionHandler.h \
- scoped_ptr/scoped_ptr.h
+FreeValueMessage.o: FreeValueMessage.cpp FreeValueMessage.h Message.h \
+ BrowserChannel.h HostChannel.h Debug.h Platform.h DebugLevel.h \
+ ByteOrder.h Socket.h AllowedConnections.h ReturnMessage.h Value.h \
+ SessionHandler.h scoped_ptr/scoped_ptr.h
Added: changes/jat/oophm-plugins-trunk/plugins/config.mk
==============================================================================
--- (empty file)
+++ changes/jat/oophm-plugins-trunk/plugins/config.mk Wed Dec 3 17:11:00
2008
@@ -0,0 +1,67 @@
+# This Makefile fragment sets the following make variables according to the
+# current platform:
+# ARCH - the Mozilla architecture name, such as x86, x86_64, ppc, etc
+# FLAG32BIT - 32 or 64
+# MARCH - the Mac architecture, such as i386 or ppc
+# OS - linux, mac, or sun
+# CFLAGS - appropriate C compiler flags for this platform
+# CXXFLAGS - appropriate C++ compiler flags for this platform
+# Also, various stanard make variables are overridden if necessary, such
as AR
+#
+# If ARCH is already set, that is used instead of uname -m to get the
+# architecture to build. This can be used to build a 32-bit plugin on a
64-bit
+# platform, for example: make ARCH=x86
+
+ARCH ?= $(shell uname -m)
+
+# default is 32 bits
+FLAG32BIT=32
+
+# Figure out 64-bit platforms, canonicalize ARCH
+ifeq ($(ARCH),x86_64)
+FLAG32BIT=64
+else ifeq ($(ARCH),sparc)
+FLAG32BIT=64
+else ifeq ($(ARCH),alpha)
+FLAG32BIT=64
+else ifeq ($(ARCH),ia64)
+FLAG32BIT=64
+else ifeq ($(ARCH),athlon)
+ARCH=x86
+else ifeq ($(ARCH),i386)
+ARCH=x86
+else ifeq ($(ARCH),i486)
+ARCH=x86
+else ifeq ($(ARCH),i586)
+ARCH=x86
+else ifeq ($(ARCH),i686)
+ARCH=x86
+else ifeq ($(ARCH),i86pc)
+ARCH=x86
+else ifeq ($(ARCH),Macintosh)
+ARCH=ppc
+endif
+MARCH=$(ARCH)
+ifeq ($(ARCH),x86)
+MARCH=i386
+endif
+
+ifeq ($(shell uname),Linux)
+OS=linux
+CFLAGS= -g -O2 -fPIC $(INC) -rdynamic -m$(FLAG32BIT)
+else ifeq ($(shell uname),Darwin)
+OS=mac
+CFLAGS= -g -O2 -fPIC $(INC) -D__mac -arch $(MARCH)
+AR=libtool
+ARFLAGS=-static -o
+else ifeq ($(shell uname),SunOS)
+OS=sun
+#CFLAGS=-fast -g0 -Kpic $(INC) -Bdynamic -noex
+# SunC appears to miscompile Socket::writeByte by not incrementing the
+# buffer pointer, so no optimization for now
+#CFLAGS=-g -Kpic $(INC) -Bdynamic -noex
+CFLAGS= -g0 -Kpic -noex -xO1 -xlibmil -xlibmopt -features=tmplife
-xbuiltin=%all -mt $(INC)
+CXX= CC
+endif
+
+CXXFLAGS = $(CFLAGS)
--~--~---------~--~----~------------~-------~--~----~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~----------~----~----~----~------~----~------~--~---