home *** CD-ROM | disk | FTP | other *** search
/ The Net: Ultimate Internet Guide / WWLCD1.ISO / pc / java / un2maiq4 / pjjava / src / defaults.mak < prev    next >
Encoding:
Text File  |  1996-08-14  |  4.0 KB  |  142 lines

  1. ##############################################################################
  2. #
  3. #  Copyright (c) Dow Jones and Company. 1994,1995. All Rights Reserved.
  4. #
  5. #  defaults.mak
  6. #
  7. #      Makefile that defines default macros and generalized rules for a Java project.
  8. #      Include in a project makefile.
  9. #
  10. # Macros defined in this file.  Please keep this comment and a corresponding one
  11. # in PROJECT.MAK up to date.
  12. #
  13. # Macro         # Meaning                       Default value
  14. # -----         # -------                       -------------
  15. # CFG           # Build configuration.          "Java Debug"
  16. # JAVACFLAGS    # Java compiler flags.          CFG-dependent value.
  17. # JAVAC         # Java compiler.                javac
  18. # JAVACC        # Compiler and flags            $(JAVAC) $(JAVACFLAGS)
  19. # JAVADFLAGS    # Java documenter flags         (none)
  20. # JAVADOC       # Java documenter               javadoc
  21. # JAVADD        # Java documenter and flags     $(JAVADOC) $(JAVADFLAGS)
  22. # JAVACLASSDIR  # Directory for output classes  .\classes
  23. # JAVADOCDIR    # Directory for output docs     .\apidocs
  24. #
  25. #  Authors:
  26. #
  27. #      rphall   Rick Hall
  28. #
  29. #  Version Ident:
  30. #
  31. #      $Header: /PjJavaClient/src/defaults.mak 2     1/21/96 7:36p Rphall $
  32. #
  33. #  History:
  34. #
  35. #      12/17/95    rphall      initial creation
  36. #
  37. ##############################################################################
  38.  
  39. .SUFFIXES: .java .class .html
  40.  
  41. # Location of default make files
  42. !IF "$(JAVAMAKEDIR)" == ""
  43. !MESSAGE No makefile directory specified.
  44. !MESSAGE You can specify a directory when running NMAKE on this makefile
  45. !MESSAGE by defining the macro JAVAMAKEDIR on the command line.  For example:
  46. !MESSAGE 
  47. !MESSAGE NMAKE /f "MY_JAVA_PROJ.MAK" JAVAMAKEDIR=".\..\.."
  48. !MESSAGE 
  49. !MESSAGE Possible choices for the makefile directory are:
  50. !MESSAGE 
  51. !MESSAGE ".\..\.."           (assumes the project directory is "src\package\project")
  52. !MESSAGE "\PjJavaClient\src" (assumes the project directory is "\PjJavaClient\src\package\project")
  53. !MESSAGE 
  54. !ERROR No makefile directory specified.
  55. !ENDIF 
  56.  
  57. # Build configuration
  58. !IF "$(CFG)" == ""
  59. CFG=Java Debug
  60. !MESSAGE No configuration specified.  Defaulting to "Java Debug".
  61. !ENDIF 
  62.  
  63. !IF "$(CFG)" != "Java Release" && "$(CFG)" != "Java Debug"
  64. !MESSAGE Invalid configuration $(CFG) specified.
  65. !MESSAGE You can specify a configuration when running NMAKE on this makefile
  66. !MESSAGE by defining the macro CFG on the command line.  For example:
  67. !MESSAGE 
  68. !MESSAGE NMAKE /f "MY_JAVA_PROJ.MAK" CFG="Java Debug"
  69. !MESSAGE 
  70. !MESSAGE Possible choices for configuration are:
  71. !MESSAGE 
  72. !MESSAGE "Java Release" (uses the (based on "Win32 (x86) Dynamic-Link Library")
  73. !MESSAGE "Java Debug"   (based on "Win32 (x86) Dynamic-Link Library")
  74. !MESSAGE 
  75. !ERROR An invalid configuration is specified.
  76. !ENDIF
  77.  
  78. !IF "$(CFG)" == "Java Debug"
  79. !MESSAGE Debug build.
  80. !ENDIF
  81. !IF "$(CFG)" == "Java Release"
  82. !MESSAGE Release build.
  83. !ENDIF
  84.  
  85. # Java compiler flags
  86. !IF "$(JAVACFLAGS)" == ""
  87.  
  88. #   Debug
  89. !IF "$(CFG)" == "Java Debug"
  90. JAVACFLAGS=-g  # -g : generate debugging tables
  91. !ENDIF # CFG == Debug
  92.  
  93. #   Release
  94. !IF "$(CFG)" == "Java Release"
  95. JAVACFLAGS=-O # -O : optimize
  96. !ENDIF # CFG == Release
  97.  
  98. !ENDIF # JAVACFLAGS
  99.  
  100. # Java compiler
  101. !IF "$(JAVAC)" == ""
  102. JAVAC=javac
  103. !ENDIF
  104.  
  105. # Java compiler and flags
  106. JAVACC=$(JAVAC) $(JAVACFLAGS)
  107.  
  108. # Java documenter flags
  109. !IF "$(JAVADFLAGS)" == ""
  110. #JAVADFLAGS=
  111. !ENDIF
  112.  
  113. # Java documenter
  114. !IF "$(JAVADOC)" == ""
  115. JAVADOC=javadoc
  116. !ENDIF
  117.  
  118. # Java documenter and flags
  119. !IF "$(JAVADD)" == ""
  120. JAVADD=$(JAVADOC) $(JAVADFLAGS)
  121. !ENDIF
  122.  
  123. # Location whither output classes are copied
  124. !IF "$(JAVACLASSDIR)" == ""
  125. JAVACLASSDIR=.\classes
  126. !MESSAGE No output class directory specified.  Defaulting to .\classes.
  127. !ENDIF 
  128.  
  129. # Location whither output documentation is copied
  130. !IF "$(JAVADOCDIR)" == ""
  131. JAVADOCDIR=.\apidocs
  132. !MESSAGE No output documentation directory specified.  Defaulting to .\apidocs.
  133. !ENDIF 
  134.  
  135. # Generalized Rules
  136. .java.class:
  137.     $(JAVACC) $*.java
  138.  
  139. .java.html:
  140.     $(JAVADD) $*.java
  141.  
  142.