# Written By Fredrik Hübinette # All rights reserved. No warrenties, use at your own risk. # This source is distributed under the GNU GENERAL PUBLIC LICENCE, # see the file "COPYING" for more information. ## Localinstall here BROWSERDIR=.mozilla # Where is your Plugin Source Development Kit from Netscape? SDK=pluginsdk # # For building rpms root= # You may want to change this to /usr/ on # some installations. prefix=@prefix@ mandir=$(prefix)/man libdir=$(prefix)/lib plugindir=UNKNOWN browsers=mozilla opera netscape firefox galeon # # RPMDIR=rpmdir # Choose compiler CC=@CC@ LD=@LD@ BINFORMAT=bin OPT_FLAGS=@CFLAGS@ @SET_MAKE@ # Undefine STREAMER to disable the streaming feature in plugger. # Streaming is now disabled by default, since mozilla has no way of # dealing with downloads that go faster than what the plugin is able # to digest the data. #STREAM=-DSTREAMER # # No user servicable parts beyond this point # VERSION=5.1.3 BASE_FILES=plugger.7 README COPYING \ pluggerrc install-sh plugger-oohelper \ magic-install.sh SOURCE_FILES= plugger.c plugger-helper.c plugger-common.c \ plugger-controller.c \ plugger.h README.in \ pluginsdk/include/npapi.h \ pluginsdk/include/jri_md.h \ pluginsdk/include/jritypes.h \ pluginsdk/include/jri.h \ pluginsdk/include/npupp.h \ pluginsdk/common/npunix.c \ configure.in configure Makefile.in BIN_FILES=plugger.so plugger-$(VERSION) plugger-controller Makefile DEBUG= # -DDEBUG # -DPLUGIN_TRACE DEFINES=$(STREAM) -DVERSION=\"$(VERSION)\" $(DEBUG) COMMON_CFLAGS=$(OPT_FLAGS) -I$(SDK)/include -I@x_includes@ -DXP_UNIX $(DEFINES) COMMON_LDFLAGS=@LDFLAGS@ NORM_CFLAGS= NORM_LDFLAGS= XCFLAGS=@XCFLAGS@ @X_CFLAGS@ XLDFLAGS=@XLDFLAGS@ XLIBS= -L@x_libraries@ @X_PRE_LIBS@ -lX11 @X_EXTRA_LIBS@ LIBS=@LIBS@ LDSHARED=$(LD) $(COMMON_LDFLAGS) $(XLDFLAGS) CFLAGS=$(COMMON_CFLAGS) $(NORM_CFLAGS) LDFLAGS=$(COMMON_LDFLAGS) $(NORM_LDFLAGS) SHARED_CFLAGS=$(COMMON_CFLAGS) $(XCFLAGS) ## Targes all: plugger.so plugger-$(VERSION) plugger-controller irix: ./configure && make aix: ./configure && make hp-gcc: ./configure && make hp-cc: ./configure && make linux: ./configure && make solaris-gcc: ./configure && make solaris-cc: ./configure && make du: ./configure && make freebsd-aout: ./configure && make freebsd-elf: ./configure && make auto: ./configure && make plugger-$(VERSION): plugger-helper.o plugger-common.o $(CC) $(LDFLAGS) -o plugger-$(VERSION) plugger-helper.o plugger-common.o $(XLIBS) $(LIBS) plugger.so: plugger.o common.o plugger-common.o $(LDSHARED) $(COMMON_LDFLAGS) -o plugger.so plugger.o common.o plugger-common.o plugger-controller: plugger-controller.o plugger-common.c plugger-common.o $(CC) $(LDFLAGS) -o plugger-controller plugger-controller.o plugger-common.o $(XLIBS) $(LIBS) ## .o files plugger-helper.o: plugger.h plugger.o: plugger.c plugger.h $(CC) -c $(SHARED_CFLAGS) -DSYSCONFDIR=\"$(prefix)/etc\" -o plugger.o plugger.c plugger-common.o: plugger-common.c plugger.h $(CC) -c $(SHARED_CFLAGS) -o plugger-common.o plugger-common.c common.o: $(SDK)/common/npunix.c $(CC) -c $(SHARED_CFLAGS) -o common.o $(SDK)/common/npunix.c plugger-controller.o: plugger.h clean: -rm *.o spotless: clean -rm *.so *~ core plugger-$(VERSION) -rm -rf rpmtmp localinstall: plugger.so plugger-$(VERSION) plugger-controller ./install-sh -c plugger.so $$HOME/$(BROWSERDIR)/plugins/plugger.so ./install-sh -c plugger-$(VERSION) $$HOME/.plugger/plugger-$(VERSION) ./install-sh -c plugger-controller $$HOME/.plugger/plugger-controller ./install-sh -c plugger-oohelper $$HOME/.plugger/plugger-oohelper if [ -f $$HOME/.plugger/pluggerrc-$(VERSION) ]; then mv $$HOME/.plugger/pluggerrc-$(VERSION) $$HOME/.plugger/pluggerrc-$(VERSION).old ; fi ./install-sh -c pluggerrc $$HOME/.plugger/pluggerrc-$(VERSION) localinstall_mozilla: make localinstall BROWSERDIR=.mozilla localinstall_netscape: make localinstall BROWSERDIR=.netscape localinstall_opera: make localinstall BROWSERDIR=.opera install: plugger.so plugger-$(VERSION) plugger-controller ./install-sh -c plugger-$(VERSION) $(root)$(prefix)/bin/ ./install-sh -c plugger-controller $(root)$(prefix)/bin/ ./install-sh -c plugger-oohelper $(root)$(prefix)/bin/ ./install-sh -c plugger.7 $(root)$(mandir)/man7/ if [ ! -f $(root)/etc/pluggerrc-$(VERSION) ]; then ./install-sh -c pluggerrc $(root)/etc/pluggerrc-$(VERSION) ; fi if [ "$(plugindir)" = "UNKNOWN" ]; then \ ./magic-install.sh $(browsers) ; \ else \ ./install-sh -c plugger.so $(root)$(plugindir)/mozilla/plugins/ ; \ fi plugger-$(VERSION).tar.gz: $(BASE_FILES) $(SOURCE_FILES) ( DIR=`pwd`;\ BASE=`basename $$DIR`;\ cd .. ; \ if [ "$$BASE" != "plugger-$(VERSION)" ]; then \ ln -s "$$BASE" plugger-$(VERSION) ; \ fi ;\ tar cf - `for a in $(BASE_FILES) $(SOURCE_FILES); do echo plugger-$(VERSION)/$$a ; done` | gzip -9 >plugger-$(VERSION)/plugger-$(VERSION).tar.gz ;\ if [ "$$BASE" != "plugger-$(VERSION)" ]; then \ rm plugger-$(VERSION) ; \ fi ;\ ) export: plugger-$(VERSION).tar.gz bin_export: plugger-$(VERSION)-$(BINFORMAT).tar.gz echo_version: @echo $(VERSION) README: README.in Makefile sed README -e 's/@VERSION@/$(VERSION)/g' plugger-$(VERSION)-$(BINFORMAT).tar.gz: $(BASE_FILES) $(SOURCE_FILES) $(BIN_FILES) @( DIR=`pwd`;\ BASE=`basename $$DIR`;\ cd .. ; \ if [ "$$BASE" != "plugger-$(VERSION)" ]; then \ ln -s "$$BASE" plugger-$(VERSION) ; \ fi ;\ tar cf - `for a in $(BASE_FILES) $(BIN_FILES); do echo plugger-$(VERSION)/$$a ; done` | gzip -9 >plugger-$(VERSION)/plugger-$(VERSION)-$(BINFORMAT).tar.gz ;\ if [ "$$BASE" != "plugger-$(VERSION)" ]; then \ rm plugger-$(VERSION) ; \ fi ;\ )