Project

General

Profile

ppfx.patch

Lynn Garren, 03/12/2017 11:13 AM

View differences:

ppfx/Makefile 2017-03-12 10:28:33.000000000 -0500
1 1

  
2
prefix=$(PPFX_FQ_DIR)
2 3
OBJS_LIB = $(shell ls src/*.cpp | sed 's/\.cpp/.o/')
3 4
PROGS = $(shell ls src/*.C | sed 's/\.C//' | sed 's/src\///')
4
INCLUDES = -I./include -I$(shell root-config --incdir) -I$(BOOSTROOT) -I${DK2NU_INC}
5
INCLUDES = -I./include -I$(shell root-config --incdir) -I$(BOOST_INC) -I$(DK2NU_INC)
5 6
DEPLIBS=$(shell root-config --libs) -lEG 
6 7

  
7 8
CC	=	g++
8
COPTS	=	-fPIC -DLINUX -O0  -g $(shell root-config --cflags) $(M32)
9
COPTS	=	-fPIC -DLINUX -O0  -g $(shell root-config --cflags) 
9 10
FLAGS   =       -g
10 11

  
11
all:    lib programs doxy
12
all:  mklibbin lib programs
12 13

  
13 14
lib: libppfx.so 
14 15

  
15
libppfx.so: $(OBJS_LIB)
16
	if [ ! -d lib ]; then mkdir -p lib; fi
16
mklibbin:
17
	if [ ! -d $(prefix)/lib ]; then mkdir -p $(prefix)/lib; fi
18
	if [ ! -d $(prefix)/bin ]; then mkdir -p $(prefix)/bin; fi
17 19

  
18
	$(CC) -shared $(M32) -o lib/$@ $^ -L${DK2NU_LIB} -ldk2nuTree
20
libppfx.so: $(OBJS_LIB)
21
	$(CC) -shared -o $(prefix)/lib/$@ $^ -L$(DK2NU_LIB) -ldk2nuTree $(DEPLIBS)
19 22

  
20 23

  
21 24
programs: $(PROGS)
22 25
	echo making $(PROGS)
23 26

  
24 27
$(PROGS): % : src/%.o $(OBJS_LIB)  libppfx.so
25
	if [ ! -d bin ]; then mkdir -p bin; fi
26

  
27
	$(CC) -Wall $(M32) -o bin/$@ $< $(PPFX_OBJS) $(DEPLIBS) -L$(PPFX_DIR)/lib -lppfx -L${DK2NU_LIB} -ldk2nuTree
28
	$(CC) -Wall -o $(prefix)/bin/$@ $< $(PPFX_OBJS) $(DEPLIBS) \
29
	      -L$(prefix)/lib -lppfx -L$(DK2NU_LIB) -ldk2nuTree
28 30

  
29 31

  
30 32
%.o: %.cpp
......
46 48
	-rm src/*.o
47 49

  
48 50
dellib:
49
	if [ -d lib ]; then rm -rf lib; fi 		
51
	if [ -d $(prefix)/lib ]; then rm -rf $(prefix)/lib; fi 		
50 52

  
51 53
delbin:
52
	if [ -d bin ]; then rm -rf bin; fi
54
	if [ -d $(prefix)/bin ]; then rm -rf $(prefix)/bin; fi
53 55

  
54 56
deldoxy:
55 57
	if [ -d html ]; then rm -rf html; fi
ppfx/src/ParameterTable.cpp 2017-03-12 09:44:59.000000000 -0500
2 2
#include "ParameterTable.h"
3 3
#include "Exceptions.h"
4 4

  
5
#include <algorithm>
6

  
5 7
namespace NeutrinoFluxReweight{ 
6 8
  
7 9
  void ParameterTable::setParameter(Parameter p){