📄 makefile
字号:
# Makefile for Class Library Snow + snow executable# This makefile creates subdirectories for the header files and source# directories; once compiled, it moves the library source and headers to# these directories.# It then compiles the executable.NAME = snowVERSION = 3.2.1#PROFILE = -pg -gstabs # If you want to create performance profiles with gprofCXXFLAGS = -O3 -fPIC $(PROFILE)# For Linux, uncomment the following, and see the note a few lines down next# to the "LIBRARIES" variable.# Tested on Linux 2.4.18-19.7.x with GCC v2.96CXXFLAGS += -DLINUX# If you do not have hash_map support, comment out the following line.CXXFLAGS += -DHASH_MAPifdef SERVERCXXFLAGS += -DSERVER_MODE_LIBRARIES = -lpthread # You may need to remove xnet if using Linux.endif# *****SPECIFY ABSOLUTE PATH TO LIBSNOW DIRECTORY HERE******LIBSNOWDIR = ./LIBSNOWHEADERSDIR = ./ LIBSNOWSOURCEDIR = ./LIBRARIES += -L$(LIBSNOWDIR) -lsnow####### Library class DependenciesSNOWOBJS = Cloud.o TargetRank.o Winnow.o Perceptron.o NaiveBayes.o \ Target.o TargetIdSet.o Snow.o SnowParam.o Example.o Network.oCLOUDDEPS = Cloud.h TargetRank.h Winnow.h Perceptron.h NaiveBayes.h \ LearningAlgorithm.h Target.h GlobalParams.h TargetIdSet.h \ SnowTypes.h MinimalFeature.hEXAMPLEDEPS = Example.h GlobalParams.h TargetIdSet.h SnowTypes.hNAIVEBAYESDEPS = NaiveBayes.h LearningAlgorithm.h Target.h GlobalParams.h \ TargetIdSet.h SnowTypes.h MinimalFeature.hNETWORKDEPS = Network.h TargetRank.h Winnow.h Perceptron.h NaiveBayes.h \ LearningAlgorithm.h Target.h GlobalParams.h TargetIdSet.h \ SnowTypes.h MinimalFeature.hPERCEPTRONDEPS = Perceptron.h LearningAlgorithm.h Target.h GlobalParams.h \ TargetIdSet.h SnowTypes.h MinimalFeature.hSNOWDEPS = GlobalParams.h Cloud.h Network.h Example.h SNOWPARAMDEPS = SnowParam.h GlobalParams.h TargetIdSet.h SnowTypes.hTARGETDEPS = Target.h LearningAlgorithm.h GlobalParams.h TargetIdSet.h \ Winnow.h Perceptron.h NaiveBayes.h SnowTypes.h MinimalFeature.hTARGETIDSETDEPS = TargetIdSet.h SnowTypes.hTARGETRANKDEPS = TargetRank.h GlobalParams.h TargetIdSet.h SnowTypes.hWINNOWDEPS = Winnow.h LearningAlgorithm.h Target.h GlobalParams.h \ TargetIdSet.h SnowTypes.h MinimalFeature.hMAINDEPS = SendReceive.h###SOURCES = $(wildcard *.cpp)#### Build rules for executable$(NAME) : Main.o $(MAINDEPS) $(CXX) -I$(LIBSNOWHEADERSDIR) $(PROFILE) -o $(NAME) Main.o $(LIBRARIES)MAINDEPS = Snow.h Usage.h SnowParam.h SendReceive.h libsnow.aMain.o : Main.cpp $(MAINDEPS) $(CXX) -I$(LIBSNOWHEADERSDIR) -c $(CXXFLAGS) Main.cpp#### Build rules for Snow library:libsnow.a : $(SNOWOBJS) ar rc libsnow.a $(SNOWOBJS) ranlib libsnow.aCloud.o : $(CLOUDDEPS) $(CXX) -c $(CXXFLAGS) Cloud.cpp Example.o : $(EXAMPLEDEPS) $(CXX) -c $(CXXFLAGS) Example.cppNaiveBayes.o : $(NAIVEBAYESDEPS) $(CXX) -c $(CXXFLAGS) NaiveBayes.cpp Network.o : $(NETWORKDEPS) $(CXX) -c $(CXXFLAGS) Network.cpp Perceptron.o : $(PERCEPTRONDEPS) $(CXX) -c $(CXXFLAGS) Perceptron.cpp Snow.o : $(SNOWDEPS) $(CXX) -c $(CXXFLAGS) Snow.cpp SnowParam.o : $(SNOWPARAMDEPS) $(CXX) -c $(CXXFLAGS) SnowParam.cpp Target.o : $(TARGETDEPS) $(CXX) -c $(CXXFLAGS) Target.cpp TargetIdSet.o : $(TARGETIDSETDEPS) $(CXX) -c $(CXXFLAGS) TargetIdSet.cppTargetRank.o : $(TARGETRANKDEPS) $(CXX) -c $(CXXFLAGS) TargetRank.cpp Winnow.o : $(WINNOWDEPS) $(CXX) -c $(CXXFLAGS) Winnow.cpp #SendReceive.o: SendReceive.h SendReceive.cpp# $(CXX) -c $(CXXFLAGS) SendReceive.cpp####### Utility rules.PHONY : clean distclean: -rm -f core gmon.out $(SNOWOBJS) $(NAME)EXTRAS = Makefile getopt.c README README2 revisions.txt \ booleanexample/booleantest.snow booleanexample/one_target.arch \ booleanexample/one_target_train.snow booleanexample/run.bat \ booleanexample/run.sh booleanexample/two_targets.arch \ booleanexample/two_targets_train.snow \ booleanexample/conjunction_generator.pl \ booleanexample/disjunction_generator.pl \ tutorial/example_client.pl tutorial/archfile tutorial/testdata.snow \ tutorial/traindata.snow tutorial/tutorial.bat tutorial/tutorial.sh \ tutorial/Getopt/Declare.pmdist : ../SNoW_v$(VERSION).tar.gz../SNoW_v$(VERSION).tar.gz : $(SOURCES) *.h $(EXTRAS) cd ..; gtar zcf $(@F) $(^:%=$(notdir $(PWD))/%)###
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -