home *** CD-ROM | disk | FTP | other *** search
- ##############################################################################
- #
- # Copyright (c) Dow Jones and Company. 1994,1995. All Rights Reserved.
- #
- # defaults.mak
- #
- # Makefile that defines default macros and generalized rules for a Java project.
- # Include in a project makefile.
- #
- # Macros defined in this file. Please keep this comment and a corresponding one
- # in PROJECT.MAK up to date.
- #
- # Macro # Meaning Default value
- # ----- # ------- -------------
- # CFG # Build configuration. "Java Debug"
- # JAVACFLAGS # Java compiler flags. CFG-dependent value.
- # JAVAC # Java compiler. javac
- # JAVACC # Compiler and flags $(JAVAC) $(JAVACFLAGS)
- # JAVADFLAGS # Java documenter flags (none)
- # JAVADOC # Java documenter javadoc
- # JAVADD # Java documenter and flags $(JAVADOC) $(JAVADFLAGS)
- # JAVACLASSDIR # Directory for output classes .\classes
- # JAVADOCDIR # Directory for output docs .\apidocs
- #
- # Authors:
- #
- # rphall Rick Hall
- #
- # Version Ident:
- #
- # $Header: /PjJavaClient/src/defaults.mak 2 1/21/96 7:36p Rphall $
- #
- # History:
- #
- # 12/17/95 rphall initial creation
- #
- ##############################################################################
-
- .SUFFIXES: .java .class .html
-
- # Location of default make files
- !IF "$(JAVAMAKEDIR)" == ""
- !MESSAGE No makefile directory specified.
- !MESSAGE You can specify a directory when running NMAKE on this makefile
- !MESSAGE by defining the macro JAVAMAKEDIR on the command line. For example:
- !MESSAGE
- !MESSAGE NMAKE /f "MY_JAVA_PROJ.MAK" JAVAMAKEDIR=".\..\.."
- !MESSAGE
- !MESSAGE Possible choices for the makefile directory are:
- !MESSAGE
- !MESSAGE ".\..\.." (assumes the project directory is "src\package\project")
- !MESSAGE "\PjJavaClient\src" (assumes the project directory is "\PjJavaClient\src\package\project")
- !MESSAGE
- !ERROR No makefile directory specified.
- !ENDIF
-
- # Build configuration
- !IF "$(CFG)" == ""
- CFG=Java Debug
- !MESSAGE No configuration specified. Defaulting to "Java Debug".
- !ENDIF
-
- !IF "$(CFG)" != "Java Release" && "$(CFG)" != "Java Debug"
- !MESSAGE Invalid configuration $(CFG) specified.
- !MESSAGE You can specify a configuration when running NMAKE on this makefile
- !MESSAGE by defining the macro CFG on the command line. For example:
- !MESSAGE
- !MESSAGE NMAKE /f "MY_JAVA_PROJ.MAK" CFG="Java Debug"
- !MESSAGE
- !MESSAGE Possible choices for configuration are:
- !MESSAGE
- !MESSAGE "Java Release" (uses the (based on "Win32 (x86) Dynamic-Link Library")
- !MESSAGE "Java Debug" (based on "Win32 (x86) Dynamic-Link Library")
- !MESSAGE
- !ERROR An invalid configuration is specified.
- !ENDIF
-
- !IF "$(CFG)" == "Java Debug"
- !MESSAGE Debug build.
- !ENDIF
- !IF "$(CFG)" == "Java Release"
- !MESSAGE Release build.
- !ENDIF
-
- # Java compiler flags
- !IF "$(JAVACFLAGS)" == ""
-
- # Debug
- !IF "$(CFG)" == "Java Debug"
- JAVACFLAGS=-g # -g : generate debugging tables
- !ENDIF # CFG == Debug
-
- # Release
- !IF "$(CFG)" == "Java Release"
- JAVACFLAGS=-O # -O : optimize
- !ENDIF # CFG == Release
-
- !ENDIF # JAVACFLAGS
-
- # Java compiler
- !IF "$(JAVAC)" == ""
- JAVAC=javac
- !ENDIF
-
- # Java compiler and flags
- JAVACC=$(JAVAC) $(JAVACFLAGS)
-
- # Java documenter flags
- !IF "$(JAVADFLAGS)" == ""
- #JAVADFLAGS=
- !ENDIF
-
- # Java documenter
- !IF "$(JAVADOC)" == ""
- JAVADOC=javadoc
- !ENDIF
-
- # Java documenter and flags
- !IF "$(JAVADD)" == ""
- JAVADD=$(JAVADOC) $(JAVADFLAGS)
- !ENDIF
-
- # Location whither output classes are copied
- !IF "$(JAVACLASSDIR)" == ""
- JAVACLASSDIR=.\classes
- !MESSAGE No output class directory specified. Defaulting to .\classes.
- !ENDIF
-
- # Location whither output documentation is copied
- !IF "$(JAVADOCDIR)" == ""
- JAVADOCDIR=.\apidocs
- !MESSAGE No output documentation directory specified. Defaulting to .\apidocs.
- !ENDIF
-
- # Generalized Rules
- .java.class:
- $(JAVACC) $*.java
-
- .java.html:
- $(JAVADD) $*.java
-
-