Sample makefile

This is the makefile for the SimpleBean (simple.mk), which would be used with the "nmake" utility from Microsoft. It compiles the Bean class, and then generates a JAR using manifest information imbedded in the makefile.
# nmake file
CLASSFILES= \
	sunw\demo\simple\SimpleBean.class \

JARFILE= ..\jars\simplebean.jar

all: $(JARFILE)

# Create a JAR file with a suitable manifest.

$(JARFILE) : $(CLASSFILES) $(DATAFILES)
	jar cfm $(JARFILE) << manifest.tmp sunw\demo\simple\*.class
Name: sunw/demo/simple/SimpleBean.class
Java-Bean: True
<<

.SUFFIXES: .java .class

{sunw\demo\simple}.java{sunw\demo\simple}.class :
	set CLASSPATH=.
	javac $<

clean:
	-del sunw\demo\simple\*.class
	-del $(JARFILE)


To use makefiles like this with the nmake utility, use:
nmake -f simple.mk