The following is a makefile that shows how to compile the code related to the file loader Bean example presented in the section called “File Loader”. All it must do is compile the Java code for the Bean.
# Generated automatically from Makefile.in by configure. default: all # Basic options. srcdir = . JAVAC_FLAGS = -classpath $(CLASSPATH) -sourcepath $(srcdir) -d . JCPS = : JDOM_JAR = $(JDOM_ROOT)/jdom.jar:$(JDOM_ROOT)/xerces.jar TWEEK_SERV_LIB = $(TWEEK_BASE_DIR)/bin/TweekServices.jar TWEEK_NET_LIB = $(TWEEK_BASE_DIR)/bin/TweekEvents.jar CLASSPATH = $(TWEEK_SERV_LIB):$(TWEEK_NET_LIB):$(JDOM_JAR) # Commands to execute. JAVA_COMPILE = javac $(JAVAC_FLAGS) JAR = jar VPATH = . CLASSES = fileopentestbean/FileOpenTestBean.class ALL_CLASSES = fileopentestbean/*.class # ----------------------------------------------------------------------------- # Application build targets. # ----------------------------------------------------------------------------- all: $(MAKE) java $(MAKE) FileOpenTestBean.jar -$(MAKE) install java: $(CLASSES) FileOpenTestBean.jar: $(CLASSES) $(JAR) cvfm $@ $(srcdir)/opener_test.MF $(ALL_CLASSES) install: cp FileOpenTestBean.jar $(TWEEK_BASE_DIR)/bin/beans cp $(srcdir)/FileOpenTestBean.xml $(TWEEK_BASE_DIR)/bin/beans # Suffix rules for building object files. .SUFFIXES: .java .class .java.class: $(JAVA_COMPILE) $< # ----------------------------------------------------------------------------- # Clean-up targets. # ----------------------------------------------------------------------------- clean: rm -rf fileopentestbean clobber: @$(MAKE) clean rm -f FileOpenTestBean.jar