lundi 30 mars 2015

Beginner: Need to Run a Makefile in Windows

I am currently trying to install a program from Sourceforge. The installation process requires that I change directory paths in the makefile and execute it. I have been researching how to run the makefile but I am still lost and was hoping to get some help or be pointed in the right direction. I am running Windows 8.1. I believe the program is going to execute a java class file. However, I am unfamiliar with the language and not sure how I should alter the makefile to run in windows 8.1. I tried to run "make" in the command prompt but that didn't work. I posted the makefile below. I understand I should change the directory for ImageJ (which I have installed). But I'm not sure how I should alter path for windows and how I can then execute it. The manual instructs me to change IMAGEJ_DIR to the installation place of the program ImageJ. Then execute "make" and "make install" will generate the jar file. "My imageJ folder is located at C:\Program Files. Do I need to change the directory to execute this makefile, and if so how can I do that in windows? The makefile itself is located in my downloads folder. Any help would be greatly appreciated. Thanks!




JC=javac IMAGEJ_DIR=/home/wenja/ImageJ PLUGIN_DIR=$(IMAGEJ_DIR)/plugins/OpenBeamProfiler IJ_JAR=$(IMAGEJ_DIR)/ij.jar APACHEMATH_JAR=$(IMAGEJ_DIR)/plugins/commons-math3-3.2.jar LIBJAR=$(IJ_JAR):$(APACHEMATH_JAR) CLASSPATH=$(IMAGEJ_DIR):./:$(LIBJAR) CLASSDIR=./classes COMPILEFLAGS= COMPILEFLAGS=-Xlint:deprecation COMPILEFLAGS=-Xlint:unchecked


all: $(CLASSDIR)/BeamProfiler_Plugin.class $(CLASSDIR)/BeamProfilerFrame.class $(CLASSDIR)/BeamProfilerResultFrame.class $(CLASSDIR)/BeamViewWindow.class $(CLASSDIR)/BeamFunctionGauss.class $(CLASSDIR)/BeamFunctionSuperGauss.class


clean: rm -f $(CLASSDIR)/*.class rm -f *.jar


$(CLASSDIR)/BeamProfiler_Plugin.class: BeamProfiler_Plugin.java $(JC) $(COMPILEFLAGS) -cp $(CLASSPATH) -d $(CLASSDIR) BeamProfiler_Plugin.java


$(CLASSDIR)/BeamProfilerFrame.class: BeamProfilerFrame.java $(JC) $(COMPILEFLAGS) -cp $(CLASSPATH) -d $(CLASSDIR) BeamProfilerFrame.java


$(CLASSDIR)/BeamProfilerResultFrame.class: BeamProfilerResultFrame.java $(JC) $(COMPILEFLAGS) -cp $(CLASSPATH) -d $(CLASSDIR) BeamProfilerResultFrame.java


$(CLASSDIR)/BeamViewWindow.class: BeamViewWindow.java $(JC) $(COMPILEFLAGS) -cp $(CLASSPATH) -d $(CLASSDIR) BeamViewWindow.java


$(CLASSDIR)/BeamFunctionGauss.class: BeamFunctionGauss.java $(JC) $(COMPILEFLAGS) -cp $(CLASSPATH) -d $(CLASSDIR) BeamFunctionGauss.java


$(CLASSDIR)/BeamFunctionSuperGauss.class: BeamFunctionSuperGauss.java $(JC) $(COMPILEFLAGS) -cp $(CLASSPATH) -d $(CLASSDIR) BeamFunctionSuperGauss.java Note: the "_" in the jar file name in important to be recognized by ImageJ for including manifest use jar cfm Beam_Profiler.jar Manifest.txt BeamProfiler_Plugin.class BeamProfilerFrame.class BeamProfilerResultFrame.class it is important to jar *.class to also get ...$1.class etc.


jar: all cd $(CLASSDIR) &&\ jar cf Beam_Profiler.jar * &&\ mv Beam_Profiler.jar ../


install: jar @if test ! -d $(PLUGIN_DIR); then mkdir $(PLUGIN_DIR); fi cp Beam_Profiler.jar $(PLUGIN_DIR)


uninstall: rm -f $(PLUGIN_DIR)/Beam_Profiler.jar


Aucun commentaire:

Enregistrer un commentaire