home *** CD-ROM | disk | FTP | other *** search
/ Tools / WinSN5.0Ver.iso / NETSCAP.50 / WIN1998.ZIP / ns / cmd / xfe / plugins / javatest / Makefile < prev    next >
Encoding:
Makefile  |  1998-04-08  |  2.2 KB  |  92 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. # This is required for compilation of only this directory
  23. ifeq ($(OS_ARCH),HP-UX)
  24. CFLAGS += $(DSO_CFLAGS)
  25. endif
  26.  
  27. CSRCS = npshell.c stubs.c
  28. OBJS  = $(CSRCS:.c=.o)
  29.  
  30. LIBTARGETS = $(OBJDIR)/javatestplugin.so
  31. TARGETS = targets
  32.  
  33. # Rules to build generated headers
  34.  
  35. JRI_HEADER_CLASSES =           \
  36.     JavaTestPlugin           \
  37.     java.lang.String       \
  38.     java.awt.Window           \
  39.     java.awt.Component     \
  40.     java.awt.Color           \
  41.     java.lang.Class
  42.  
  43. JRI_STUB_CLASSES =           \
  44.     JavaTestPlugin           \
  45.     java.lang.String       \
  46.     java.awt.Window           \
  47.     java.awt.Component     \
  48.     java.awt.Color
  49.  
  50. include $(DEPTH)/config/rules.mk
  51.  
  52. CLASSSRC := .:$(DEPTH)/sun-java/classsrc
  53.  
  54. INCLUDES += -I_gen
  55.  
  56. targets:
  57.     @$(MAKE) classes
  58.     @$(MAKE) jri_headers jri_stubs
  59.     @$(MAKE) libtargets
  60.  
  61. JAVAC =    $(JAVAI) -classpath /usr/local/netscape/java/lib/javac.zip \
  62.          -ms8m sun.tools.javac.Main
  63.  
  64. classes: JavaTestPlugin.java
  65.     $(JAVAC) -classpath $(CLASSSRC) JavaTestPlugin.java
  66.  
  67. libtargets: $(LIBTARGETS)
  68.  
  69. $(OBJDIR)/javatestplugin.so: $(OBJS)
  70.     $(LD) $(DSO_LDOPTS) -o $@ $(OBJS) $(DSO_LDFLAGS)
  71.  
  72. install:: $(TARGETS)
  73.     $(INSTALL) $(TARGETS) $(DIST)/bin
  74.  
  75. INCLUDES += -I$(DEPTH)/lib/plugin
  76. GARBAGE += so_locations
  77.  
  78. clobber::
  79.     rm -rf _gen _stubs so_locations
  80.  
  81. export:: targets
  82.     $(INSTALL) $(LIBTARGETS) $(DIST)/lib
  83.  
  84. install:: export
  85.  
  86. $(OBJDIR)/stubs.o:          \
  87.     ../common/npunix.c      \
  88.     _stubs/JavaTestPlugin.c      \
  89.     _stubs/java_lang_String.c \
  90.     _stubs/java_awt_Color.c      \
  91.     _stubs/java_awt_EmbeddedFrame.c
  92.