blob: 3d11a75b90d90b50b755e4863536868d753b4b08 [file] [log] [blame]
INC=-I. -I../common
FLAG32BIT=$(shell ./get32bitflag arch)
CFLAGS=-fast -g0 -Kpic -noex -xO3 -xlibmil -xlibmopt -features=tmplife -norunpath -xbuiltin=%all -mt $(INC) -m$(FLAG32BIT) -DXP_UNIX -DLINUX -DBROWSER_NPAPI
CXXFLAGS=$(CFLAGS)
CXX=CC
INSTDIR := extension/platform/$(shell ./getarch arch)/plugins
HDRS= LocalObjectTable.h NPVariantWrapper.h Plugin.h mozincludes.h \
JavaObject.h ScriptableInstance.h
COMMON= ../common/libcommon$(FLAG32BIT).a
OBJS= main.o Plugin.o LocalObjectTable.o JavaObject.o npn_bindings.o \
ScriptableInstance.o
SRCS= main.cpp Plugin.cpp LocalObjectTable.cpp JavaObject.cpp \
npn_bindings.cc ScriptableInstance.cpp
all:: oophm.xpi
oophm.xpi: arch extension $(INSTDIR)/liboophm.so liboophm.so extension/install.rdf
-rm -f oophm.xpi
cd extension; zip -r -D -9 -o ../$@ * -x '*/.svn/*' -x 'META-INF/*'
oophm-signed.xpi: arch $(INSTDIR)/liboophm.so extension/install.rdf \
extension/META-INF/zigbert.sf
-rm -f $@
cd extension; zip -9 ../$@ META-INF/zigbert.rsa; zip -r -D -9 -o ../$@ * -x '*/.svn/*' -x META-INF/zigbert.rsa
extension: prebuilt/extension
-rm -rf extension
cp -r --preserve=mode $< $@
extension/install.rdf: extension install-template.rdf version
sed s/GWT_OOPHM_VERSION/`cat version`/ install-template.rdf >$@
$(INSTDIR):
-mkdir -p $@
extension/META-INF/zigbert.sf: $(INSTDIR)/liboophm.so
signtool -d certdb -k 'GWT Plugin' -x .svn extension/
version: computeversion $(HDRS) $(SRCS) $(COMMON)
./computeversion >$@
arch: computearch
./computearch arch
@echo "Restart make"
@exit 1
$(INSTDIR)/liboophm.so: liboophm.so
cp $< $@
liboophm.so: $(OBJS) $(COMMON) $(INSTDIR)
$(CXX) -m$(FLAG32BIT) -G -o $@ $(OBJS) $(COMMON)
$(COMMON): common
cd ../common; make -f Makefile.sun
$(OBJS): arch
.PHONY: all realclean clean depend common install install-platform
install: oophm.xpi
-cp --preserve=mode $< prebuilt
install-platform: liboophm.so
-mkdir -p $(subst extension,prebuilt/extension,$(INSTDIR))
-cp --preserve=mode $< $(subst extension,prebuilt/extension,$(INSTDIR))
realclean: clean
-rm -f arch
clean:
-rm -f $(OBJS)
-rm -f extension/platform/*/plugins/*.{so,dll}
depend:
$(CXX) -MM $(CFLAGS) $(SRCS) >>Makefile
# makedepend -- $(CFLAGS) -- $(SRCS)
# DO NOT DELETE
main.o: main.cpp ../common/Debug.h ../common/DebugLevel.h mozincludes.h \
npapi/npapi.h npapi/nphostapi.h ./npapi/npapi.h ./npapi/npruntime.h \
./npapi/npapi.h npapi/npruntime.h NPObjectWrapper.h Plugin.h ScriptableInstance.h \
../common/HostChannel.h ../common/Platform.h ../common/Message.h \
../common/ReturnMessage.h ../common/BrowserChannel.h ../common/Value.h \
../common/SessionHandler.h ../common/LoadModuleMessage.h \
../common/HostChannel.h LocalObjectTable.h ../common/SessionHandler.h \
../common/scoped_ptr/scoped_ptr.h
Plugin.o: Plugin.cpp Plugin.h ScriptableInstance.h ../common/Debug.h ../common/DebugLevel.h \
mozincludes.h npapi/npapi.h npapi/nphostapi.h ./npapi/npapi.h \
./npapi/npruntime.h ./npapi/npapi.h npapi/npruntime.h NPObjectWrapper.h \
../common/HostChannel.h ../common/Platform.h ../common/Message.h \
../common/ReturnMessage.h ../common/BrowserChannel.h ../common/Value.h \
../common/SessionHandler.h ../common/LoadModuleMessage.h \
../common/HostChannel.h LocalObjectTable.h ../common/SessionHandler.h \
../common/InvokeMessage.h ../common/ReturnMessage.h \
../common/ServerMethods.h ../common/scoped_ptr/scoped_ptr.h \
NPVariantWrapper.h ../common/Platform.h ../common/Value.h JavaObject.h
LocalObjectTable.o: LocalObjectTable.cpp mozincludes.h npapi/npapi.h \
npapi/nphostapi.h ./npapi/npapi.h ./npapi/npruntime.h ./npapi/npapi.h \
npapi/npruntime.h NPObjectWrapper.h LocalObjectTable.h
JavaObject.o: JavaObject.cpp JavaObject.h mozincludes.h npapi/npapi.h \
npapi/nphostapi.h ./npapi/npapi.h ./npapi/npruntime.h ./npapi/npapi.h \
npapi/npruntime.h NPObjectWrapper.h Plugin.h ScriptableInstance.h ../common/Debug.h \
../common/DebugLevel.h ../common/HostChannel.h ../common/Platform.h \
../common/Message.h ../common/ReturnMessage.h \
../common/BrowserChannel.h ../common/Value.h ../common/SessionHandler.h \
../common/LoadModuleMessage.h ../common/HostChannel.h \
LocalObjectTable.h ../common/SessionHandler.h NPVariantWrapper.h \
../common/Platform.h ../common/Value.h
npn_bindings.o: npn_bindings.cc mozincludes.h npapi/npapi.h \
npapi/nphostapi.h ./npapi/npapi.h ./npapi/npruntime.h ./npapi/npapi.h \
npapi/npruntime.h NPObjectWrapper.h