-
Notifications
You must be signed in to change notification settings - Fork 8
/
Makefile
59 lines (43 loc) · 1.75 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
RELEASE = 2023
PATCH = 03
SYMLINKS = release buuinput libraries
PACKAGES = release$(RELEASE) buuinput$(RELEASE) libraries$(RELEASE)_RootTuple
build: $(PACKAGES) gibuu2lund patch
+ $(MAKE) -C release buildRootTuple
+ $(MAKE) withROOT=1 -C release PDF=LHAPDF
install: build
install -D gibuu ../bin/gibuu
install -D release/objects/GiBUU.x ../bin/GiBUU.x
install -D gibuu2lund ../bin/gibuu2lund
lhapdf:
$(MAKE) -C .. lhapdf
prep: $(PACKAGES) lhapdf
download: $(addsuffix .tar.gz,$(PACKAGES))
for pdf in $(PDFSETS); do\
wget -N $$pdf; \
done
release$(RELEASE): release$(RELEASE).tar.gz
@ [ -e $@ ] || tar -xzvf $<
buuinput$(RELEASE): buuinput$(RELEASE).tar.gz
@ [ -e $@ ] || tar -xzvf $<
libraries$(RELEASE)_RootTuple: libraries$(RELEASE)_RootTuple.tar.gz
@ [ -e libraries${RELEASE} ] || tar -xzvf $<
$(addsuffix .tar.gz,$(PACKAGES)):
wget -N --content-disposition "https://gibuu.hepforge.org/downloads?f=archive/r${RELEASE}_${PATCH}/$@"
gibuu2lund: gibuu2lund.cxx
$(CXX) $(shell root-config --cflags) -o gibuu2lund gibuu2lund.cxx $(shell root-config --evelibs)
patch: prep
patch -p 0 --forward --reject-file=- < patches/eks98.patch
patch -p 0 --forward --reject-file=- < patches/nuclear.patch
patch -p 0 --forward --reject-file=- < patches/root.patch
find ./release/code -name '*.f90' -exec sed -i 's/character(100)/character(1000)/' {} \;
find ./release/code -name '*.f90' -exec sed -i 's/character(len=100)/character(1000)/' {} \;
find ./release/code -name '*.f90' -exec sed -i 's/character(len=40)/character(1000)/' {} \;
cd release/objects/LIB/lib && ln -s ../../../../../lib/lib* .
unpatch: clean
$(MAKE) $(PACKAGES)
clean:
rm -rf $(SYMLINKS) $(PACKAGES) libraries${RELEASE}
rm -rf GiBUU.x gibuu2lund
prune:
rm -rf $(addsuffix .tar.gz,$(PACKAGES))