-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
109 lines (86 loc) · 2.71 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
#
# Makefile to build xsnoed related programs for any supported OSTYPE/MACHTYPE
#
# Phil Harvey - 12/2/98
#
# Notes:
#
# 1) Do a do a 'make clean' between builds of different xsnoed versions
# (normal, root and library versions), because these versions share
# the same object files but are compiled with different options.
#
# 2) Set the XSNOED_OPTIONS environment variable to change the XSNOED
# version compiler options. Here are some examples:
#
# setenv XSNOED_OPTIONS -UFITTR // compiles without fitter
# setenv XSNOED_OPTIONS -DNO_DISPATCH // compiles without dispatcher
# setenv XSNOED_OPTIONS -DSNOPLUS // compiles for SNO+
#
VER_NORM = $(XSNOED_OPTIONS) -DFITTR -DSNOPLUS
VER_ROOT = $(XSNOED_OPTIONS) -DFITTR -DROOT_FILE -DROOT_SYSTEM -DROOT_APP
VER_LIB = $(XSNOED_OPTIONS) -DFITTR -DROOT_FILE -DROOT_SYSTEM -DNO_MAIN
#-NT
VER_SNOMAN = $(XSNOED_OPTIONS) -DFITTR -DNO_MAIN -DXSNOMAN -DNO_DISPATCH
ifndef OSTYPE
OSTYPE = $(shell uname -s | tr '[:upper:]' '[:lower:]')
endif
ifndef MACHTYPE
MACHTYPE = $(shell uname -m)
endif
PLATFORM = $(OSTYPE)_$(MACHTYPE)$(XSNOED_MAKE_VER)
PROGS = xsnoed
all: $(PROGS)
# Set all these dependencies to files that don't exist,
# thereby forcing the appropriate make to be performed each time.
#nt
xsnoed: xsnoed_
@echo Done.
xsnoed.root: xsnoed.root_
@echo Done.
redispatch: redispatch_
@echo Done.
# Call make again for the proper platform
xsnoed.root_:
@echo ==== Making xsnoed.root ====
make "VERFLAGS=$(VER_ROOT)" -f Makefile.$(PLATFORM) xsnoed.root
xsnoed_:
@echo ==== Making xsnoed ====
make "VERFLAGS=$(VER_NORM)" -f Makefile.$(PLATFORM) xsnoed
redispatch_:
make -f Makefile.$(PLATFORM) redispatch
root:
@echo ==== Making root.exe ====
make -f Makefile.$(PLATFORM) root.exe
libqsnoed:
@echo ==== Making libqsnoed.so ====
make "VERFLAGS=$(VER_LIB)" -f Makefile.$(PLATFORM) libqsnoed
# Utilities
clean:
rm -f *.o *.C *.log core
@echo Clean.
install: libqsnoed
cp -p libqsnoed.so ../lib
cp -p Q*.cxx ../src
cp -p Q*.h ../src
cp -p Q*.h ../include
cp -p include/*.h ../include/include
cp -p XSnoed ../parameters
cp -p *.geo ../parameters
cp -p database.dat ../parameters
cp -p fitter.dat ../parameters
make -f Makefile.$(PLATFORM) root.exe
cp -p root.exe ../bin/root
strip ../bin/root
@echo Installed.
zip:
rm -f xsnoed.tar xsnoed.tar.gz xsnoed_headers.dat
ls *.h include/*.h linux_patch/*.h qplib/*.h > xsnoed_headers.dat
tar -cf xsnoed.tar *.cxx *.h *.com Makefile* XSnoed.resource README include/* linux_patch/* qplib/* html/* *.geo *.dat *.doc
gzip xsnoed.tar
@echo Done.
unzip:
cp xsnoed.tar.gz tmp_xsnoed.tar.gz
gunzip tmp_xsnoed.tar.gz
tar -xf tmp_xsnoed.tar
rm -f tmp_xsnoed.tar
@echo Done.