home *** CD-ROM | disk | FTP | other *** search
/ Chip 1998 July / Chip_1998-07_cd.bin / zkuste / JBuilder / BDK / Win / bdk_sep97.exe / _SETUP.1 / buttons.gmk < prev    next >
Encoding:
Text File  |  1997-09-10  |  1.9 KB  |  58 lines

  1.  
  2. # This makefile delivers two beans (OurButton and ExplicitButton)
  3. # in a single JAR file.
  4.  
  5. CLASSFILES= \
  6.     sunw/demo/buttons/ExplicitButton.class \
  7.     sunw/demo/buttons/ExplicitButtonBeanInfo.class \
  8.     sunw/demo/buttons/ExternalizableButton.class \
  9.     sunw/demo/buttons/OurButton.class \
  10.     sunw/demo/buttons/OurButtonCustomizer.class 
  11.  
  12. DATAFILES= \
  13.     sunw/demo/buttons/ExplicitButtonIcon16.gif \
  14.     sunw/demo/buttons/ExplicitButtonIcon32.gif \
  15.     sunw/demo/buttons/BlueButton.ser \
  16.     sunw/demo/buttons/OrangeButton.ser
  17.  
  18. JARFILE= ../jars/buttons.jar
  19.  
  20. all: $(JARFILE)
  21.  
  22. # Create a JAR file with a suitable manifest.
  23.  
  24. $(JARFILE): $(CLASSFILES) $(DATAFILES)
  25.     echo "Name: sunw/demo/buttons/OurButton.class" >> manifest.tmp
  26.     echo "Java-Bean: True" >> manifest.tmp
  27.     echo "" >> manifest.tmp
  28.     echo "Name: sunw/demo/buttons/ExplicitButton.class" >> manifest.tmp
  29.     echo "Java-Bean: True" >> manifest.tmp
  30.     echo "" >> manifest.tmp
  31.     echo "Name: sunw/demo/buttons/OrangeButton.ser" >> manifest.tmp
  32.     echo "Java-Bean: True" >> manifest.tmp
  33.     echo "" >> manifest.tmp
  34.     echo "Name: sunw/demo/buttons/BlueButton.ser" >> manifest.tmp
  35.     echo "Java-Bean: True" >> manifest.tmp
  36.     jar cfm $(JARFILE) manifest.tmp sunw/demo/buttons/*.class $(DATAFILES)
  37.     @/bin/rm manifest.tmp
  38.  
  39. # Rule for compiling a normal .java file
  40. %.class: %.java
  41.     export CLASSPATH; CLASSPATH=. ; \
  42.     javac $<
  43.  
  44. # Rule for running a program to create a serialized orange buton.
  45. sunw/demo/buttons/OrangeButton.ser: $(CLASSFILES) sunw/demo/buttons/OrangeButtonWriter.class
  46.     export CLASSPATH; CLASSPATH=. ; \
  47.     java sunw.demo.buttons.OrangeButtonWriter $@
  48.  
  49. # Rule for running a program to create a serialized blue buton.
  50. sunw/demo/buttons/BlueButton.ser: $(CLASSFILES) sunw/demo/buttons/BlueButtonWriter.class
  51.     export CLASSPATH; CLASSPATH=. ; \
  52.     java sunw.demo.buttons.BlueButtonWriter $@
  53.  
  54. clean:
  55.     /bin/rm -f sunw/demo/buttons/*.class
  56.     /bin/rm -f sunw/demo/buttons/*.ser
  57.     /bin/rm -f $(JARFILE)
  58.