From 8cfc0a21719b70ddabe16b7f55f85a97e67bc5f5 Mon Sep 17 00:00:00 2001 From: nemu Date: Tue, 15 Jan 2008 10:20:25 +0000 Subject: [PATCH] removed *.pro files and added Makefiles --- src/Makefile.msr2msr | 97 ++++++++++++++++++++++++++++++++++++++++++++ src/Makefile.musrfit | 97 ++++++++++++++++++++++++++++++++++++++++++++ src/msr2msr.pro | 22 ---------- src/musrfit.pro | 25 ------------ 4 files changed, 194 insertions(+), 47 deletions(-) create mode 100644 src/Makefile.msr2msr create mode 100644 src/Makefile.musrfit delete mode 100644 src/msr2msr.pro delete mode 100644 src/musrfit.pro diff --git a/src/Makefile.msr2msr b/src/Makefile.msr2msr new file mode 100644 index 00000000..0dfa6b2f --- /dev/null +++ b/src/Makefile.msr2msr @@ -0,0 +1,97 @@ +#--------------------------------------------------- +# Makefile.msr2msr +# +# Author: Andreas Suter +# e-mail: andreas.suter@psi.ch +# +# $Id$ +#--------------------------------------------------- + +#--------------------------------------------------- +# get compilation and library flags from root-config + +ROOTCFLAGS = $(shell $(ROOTSYS)/bin/root-config --cflags) +ROOTLIBS = $(shell $(ROOTSYS)/bin/root-config --libs) +ROOTGLIBS = $(shell $(ROOTSYS)/bin/root-config --glibs) + +#--------------------------------------------------- +# depending on the architecture, choose the compiler, +# linker, and the flags to use +# + +OSTYPE = linux + +ifeq ($(OSTYPE),linux) +OS = LINUX +endif +ifeq ($(OSTYPE),linux-gnu) +OS = LINUX +endif +ifeq ($(OSTYPE),darwin) +OS = DARWIN +endif + +# -- Linux +ifeq ($(OS),LINUX) +CXX = g++ +CXXFLAGS = -g -Wall -fPIC +PMUSRPATH = ./include +MNPATH = $(ROOTSYS)/include +INCLUDES = -I $(PMUSRPATH) -I $(MNPATH) +LD = g++ +LDFLAGS = -g +endif + +# -- Darwin +ifeq ($(OS),DARWIN) +CXX = g++ +CXXFLAGS = -g -Wall -fPIC +INCLUDES = -I../include +LD = g++ +LDFLAGS = -g +endif + +# the output from the root-config script: +CXXFLAGS += $(ROOTCFLAGS) +LDFLAGS += + +# the ROOT libraries (G = graphic) +LIBS = $(ROOTLIBS) -lXMLParser +GLIBS = $(ROOTGLIBS) -lXMLParser + +# PSI libs +PSILIBS = -lTLemRunHeader -lPMusr +# Minuit2 lib +MNLIB = -L$(ROOTSYS)/lib -lMinuit2 + +# Executable +EXEC = msr2msr + +# some definitions: headers, sources, objects,... +OBJS = +OBJS += $(EXEC).o + +# make the executable: +# +all: $(EXEC) + +$(EXEC): $(OBJS) + @echo "---> Building $(EXEC) ..." + /bin/rm -f $(SHLIB) + $(LD) $(OBJS) -o $(EXEC) $(GLIBS) $(PSILIBS) $(MNLIB) + @echo "done" + +# clean up: remove all object file (and core files) +# semicolon needed to tell make there is no source +# for this target! +# +clean:; @rm -f $(OBJS) + @echo "---> removing $(OBJS)" + +# +$(OBJS): %.o: %.cpp + $(CXX) $(INCLUDES) $(CXXFLAGS) -c $< + +install: all + @echo "doesn't do anything yet ..." + diff --git a/src/Makefile.musrfit b/src/Makefile.musrfit new file mode 100644 index 00000000..89cd546c --- /dev/null +++ b/src/Makefile.musrfit @@ -0,0 +1,97 @@ +#--------------------------------------------------- +# Makefile.musrfit +# +# Author: Andreas Suter +# e-mail: andreas.suter@psi.ch +# +# $Id$ +#--------------------------------------------------- + +#--------------------------------------------------- +# get compilation and library flags from root-config + +ROOTCFLAGS = $(shell $(ROOTSYS)/bin/root-config --cflags) +ROOTLIBS = $(shell $(ROOTSYS)/bin/root-config --libs) +ROOTGLIBS = $(shell $(ROOTSYS)/bin/root-config --glibs) + +#--------------------------------------------------- +# depending on the architecture, choose the compiler, +# linker, and the flags to use +# + +OSTYPE = linux + +ifeq ($(OSTYPE),linux) +OS = LINUX +endif +ifeq ($(OSTYPE),linux-gnu) +OS = LINUX +endif +ifeq ($(OSTYPE),darwin) +OS = DARWIN +endif + +# -- Linux +ifeq ($(OS),LINUX) +CXX = g++ +CXXFLAGS = -g -Wall -fPIC +PMUSRPATH = ./include +MNPATH = $(ROOTSYS)/include +INCLUDES = -I $(PMUSRPATH) -I $(MNPATH) +LD = g++ +LDFLAGS = -g +endif + +# -- Darwin +ifeq ($(OS),DARWIN) +CXX = g++ +CXXFLAGS = -g -Wall -fPIC +INCLUDES = -I../include +LD = g++ +LDFLAGS = -g +endif + +# the output from the root-config script: +CXXFLAGS += $(ROOTCFLAGS) +LDFLAGS += + +# the ROOT libraries (G = graphic) +LIBS = $(ROOTLIBS) -lXMLParser +GLIBS = $(ROOTGLIBS) -lXMLParser + +# PSI libs +PSILIBS = -lTLemRunHeader -lPMusr +# Minuit2 lib +MNLIB = -L$(ROOTSYS)/lib -lMinuit2 + + +EXEC = musrfit + +# some definitions: headers, sources, objects,... +OBJS = +OBJS += $(EXEC).o + +# make the executable: +# +all: $(EXEC) + +$(EXEC): $(OBJS) + @echo "---> Building $(EXEC) ..." + /bin/rm -f $(SHLIB) + $(LD) $(OBJS) -o $(EXEC) $(GLIBS) $(PSILIBS) $(MNLIB) + @echo "done" + +# clean up: remove all object file (and core files) +# semicolon needed to tell make there is no source +# for this target! +# +clean:; @rm -f $(OBJS) + @echo "---> removing $(OBJS)" + +# +$(OBJS): %.o: %.cpp + $(CXX) $(INCLUDES) $(CXXFLAGS) -c $< + +install: all + @echo "doesn't do anything yet ..." + diff --git a/src/msr2msr.pro b/src/msr2msr.pro deleted file mode 100644 index 73511fe9..00000000 --- a/src/msr2msr.pro +++ /dev/null @@ -1,22 +0,0 @@ -#------------------------------------------------------ -# msr2msr.pro -# qmake file for msr2msr -# -# Andreas Suter, 2008/01/03 -# -# $Id$ -# -#------------------------------------------------------ - -MAKEFILE = Makefile.msr2msr - -CONFIG += warn_on debug - -SOURCES = msr2msr.cpp \ - -INCLUDEPATH += $$(ROOTSYS)/include - -ROOTLIBS = $(shell $(ROOTSYS)/bin/root-config --libs) -unix:LIBS += $${ROOTLIBS} - -TARGET=msr2msr diff --git a/src/musrfit.pro b/src/musrfit.pro deleted file mode 100644 index 17c58457..00000000 --- a/src/musrfit.pro +++ /dev/null @@ -1,25 +0,0 @@ -#------------------------------------------------------ -# musrfit.pro -# qmake file for musrfit -# -# Andreas Suter, 2007/05/14 -# -# $Id$ -# -#------------------------------------------------------ - -MAKEFILE = Makefile.musrfit - -CONFIG += warn_on debug - -SOURCES = musrfit.cpp \ - -INCLUDEPATH += $$(ROOTSYS)/include -INCLUDEPATH += ./include - -PSILIBS = -lTLemRunHeader -lPMusr -ROOTLIBS = $(shell $(ROOTSYS)/bin/root-config --libs) -unix:LIBS += $${PSILIBS} -unix:LIBS += $${ROOTLIBS} - -TARGET=musrfit