home *** CD-ROM | disk | FTP | other *** search
/ Tools / WinSN5.0Ver.iso / NETSCAP.50 / WIN1998.ZIP / ns / cmd / xfe / plugins / textplugin / Makefile < prev    next >
Encoding:
Makefile  |  1998-04-08  |  2.7 KB  |  101 lines

  1. #! gmake
  2. #
  3. # The contents of this file are subject to the Netscape Public License
  4. # Version 1.0 (the "NPL"); you may not use this file except in
  5. # compliance with the NPL.  You may obtain a copy of the NPL at
  6. # http://www.mozilla.org/NPL/
  7. #
  8. # Software distributed under the NPL is distributed on an "AS IS" basis,
  9. # WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
  10. # for the specific language governing rights and limitations under the
  11. # NPL.
  12. #
  13. # The Initial Developer of this code under the NPL is Netscape
  14. # Communications Corporation.  Portions created by Netscape are
  15. # Copyright (C) 1998 Netscape Communications Corporation.  All Rights
  16. # Reserved.
  17.  
  18.  
  19.  
  20. DEPTH        = ../../../..
  21.  
  22. include $(DEPTH)/config/config.mk
  23.  
  24. # This is required for compilation of only this directory
  25. ifeq ($(OS_ARCH),HP-UX)
  26. CFLAGS        += $(DSO_CFLAGS)
  27. DSO_LDOPTS    += +e NP_GetValue +e NP_Initialize +e NP_Shutdown +e NP_GetMIMEDescription
  28. endif
  29.  
  30. # On Linux ELF, motif cannot be used by plugin. So diable the motif part.
  31. # and enable plugin trace
  32. ifeq ($(OS_ARCH),Linux)
  33. ifdef BUILD_UNIX_PLUGINS
  34. CFLAGS        += -DPLUGIN_TRACE -UTEXT_PLUGIN -I$(DEPTH)/dist/public/java
  35. endif
  36. else
  37. CFLAGS        += -DTEXT_PLUGIN -I$(DEPTH)/dist/public/java
  38. endif
  39.  
  40. CSRCS        = npshell.c stubs.c
  41. OBJS        = $(CSRCS:.c=.o)
  42.  
  43. ifeq ($(OS_ARCH),AIX)
  44. LD        = svld
  45. endif
  46.  
  47. #
  48. # Defines to build the unix plugin sdk automatically
  49. #
  50. SDK_FILES    = README \
  51.           Test.html \
  52.           Test.txt \
  53.           makefile.hpux \
  54.           makefile.osf1 \
  55.           makefile.sgi \
  56.           makefile.sol23 \
  57.           makefile.sol24 \
  58.           makefile.sun4 \
  59.           makefile.linux \
  60.           npshell.c \
  61.           $(DEPTH)/cmd/xfe/plugins/common/npunix.c \
  62.           $(DEPTH)/lib/plugin/npupp.h \
  63.           $(DEPTH)/include/npapi.h \
  64.           $(DEPTH)/dist/public/java/jri.h \
  65.           $(DEPTH)/dist/public/java/jri_md.h
  66.  
  67. SDK_TEST_FILES    = $(wildcard $(DEPTH)/cmd/xfe/plugins/test/text*)
  68.  
  69. UNIX_SDK    = unix-sdk
  70.  
  71. TARGETS        = $(OBJDIR)/libtextplugin.so
  72.  
  73. all default:: $(TARGETS) install
  74.  
  75. install:: $(TARGETS)
  76.     $(INSTALL) $(TARGETS) $(DIST)/bin
  77.  
  78. unix-sdk:: $(SDK_FILES)
  79.     echo "Generating unix plugin sdk..."; \
  80.     rm -rf $(OBJDIR)/sdk; \
  81.     mkdir -p $(OBJDIR)/sdk; \
  82.     cp $(SDK_FILES) $(OBJDIR)/sdk/.; \
  83.     mkdir -p $(OBJDIR)/sdk/test; \
  84.     cp $(SDK_TEST_FILES) $(OBJDIR)/sdk/test/.; \
  85.     cd $(OBJDIR)/sdk; \
  86.     FILES=`echo *`; \
  87.     tar cvf - $$FILES | compress -c > $(UNIX_SDK).tar.Z; \
  88.     rm -rf $$FILES
  89.  
  90. include $(DEPTH)/config/rules.mk
  91.  
  92. #DEFINES    += -DPLUGIN_TRACE
  93. INCLUDES    += -I$(DEPTH)/lib/plugin
  94. GARBAGE        += so_locations $(UNIX_SDK)
  95. OPTIMIZER    = -g
  96.  
  97. $(OBJDIR)/libtextplugin.so: $(OBJS)
  98.     $(LD) $(DSO_LDOPTS) -o $@ $(OBJS) $(DSO_LDFLAGS) $(EXTRA_DSO_LDOPTS)
  99.  
  100. $(OBJDIR)/stubs.o: ../common/npunix.c
  101.