File tree Expand file tree Collapse file tree 4 files changed +212
-0
lines changed Expand file tree Collapse file tree 4 files changed +212
-0
lines changed Original file line number Diff line number Diff line change
1
+ ## This makefile must be executed with gmake (gnu make).
2
+
3
+ ## This tells make not to delete these target files on error/interrupt (see man page)
4
+ .PRECIOUS: *.o
5
+ RM = rm -f
6
+ SHELL = /bin/sh
7
+
8
+ OBJ = make_ntuple.o
9
+
10
+ my_objs = $(OBJ)
11
+
12
+ my_deps = $(my_objs:.o=.d)
13
+
14
+ MYOS := $(subst -,,$(shell uname))
15
+ #CERNLIBS = -lgeant$(GEANTVER) -lpawlib -lgraflib -lgrafX11 -lpacklib -lmathlib
16
+ CERNLIBS = -Wl,-static -lgeant$(GEANTVER) -lpawlib -lgraflib -lgrafX11 -lpacklib -lkernlib -lmathlib -Wl,-dy
17
+
18
+
19
+ #For use with gfortran compiler
20
+ # -fno-automatic - all program storage treated as static
21
+ ifeq ($(MYOS),Linux)
22
+ FFLAGSA=-O -w -ffixed-line-length-132 -ff2c -fno-automatic -fdefault-real-8
23
+ INCLUDES=-I.
24
+ FFLAGS= $(INCLUDES) $(FFLAGSA)
25
+ FFLAG1=$(FFLAGS) -c
26
+ OTHERLIBS = -L$(CERN_ROOT)/lib $(CERNLIBS) -L/usr/lib64
27
+ # 64 vs 32 bit
28
+ # -L$(CERN_ROOT)/lib $(CERNLIBS) -L/usr/lib
29
+ FC := gfortran
30
+ F77 := gfortran
31
+ endif
32
+
33
+ %.o: %.f
34
+ $(F77) $(FFLAGS) -c $< -o $@
35
+
36
+ DEPEND_RULE = ( cat $< | sed -n -e \
37
+ "s|^[ ]*[Ii][Nn][Cc][Ll][Uu][Dd][Ee][ ]*['\"]|$@: $(@D)/|p" | \
38
+ sed -e "s|['\"].*$$||" | \
39
+ sed -e 's|.d:|.o:|') > $@
40
+
41
+ %.d: %.f
42
+ $(DEPEND_RULE)
43
+
44
+ none: make_ntuple $(my_deps)
45
+
46
+ all: make_ntuple $(my_deps)
47
+
48
+ include $(my_deps)
49
+
50
+ make_ntuple: $(my_objs) Makefile
51
+ $(F77) $(OSF_SHARED) -o $@ $(FFLAGS) $(my_objs) $(OTHERLIBS)
52
+
53
+ clean:
54
+ $(RM) *.[od] make_ntuple
55
+
Original file line number Diff line number Diff line change
1
+ ## This makefile must be executed with gmake (gnu make).
2
+
3
+ ## This tells make not to delete these target files on error/interrupt (see man page)
4
+ .PRECIOUS: *.o
5
+ RM = rm -f
6
+ SHELL = /bin/sh
7
+
8
+ OBJ = make_ntuple.o
9
+
10
+ my_objs = $(OBJ)
11
+
12
+ my_deps = $(my_objs:.o=.d)
13
+
14
+ MYOS := $(subst -,,$(shell uname))
15
+ #CERNLIBS = -lgeant$(GEANTVER) -lpawlib -lgraflib -lgrafX11 -lpacklib -lmathlib
16
+ CERNLIBS = -Wl,-static -lgeant$(GEANTVER) -lpawlib -lgraflib -lgrafX11 -lpacklib -lkernlib -lmathlib -Wl,-dy
17
+
18
+ #
19
+ CERN_ROOT=/cvmfs/oasis.opensciencegrid.org/jlab/scicomp/sw/el9/cernlib/2023
20
+ #For use with gfortran compiler
21
+ # -fno-automatic - all program storage treated as static
22
+ ifeq ($(MYOS),Linux)
23
+ FFLAGSA=-O -w -ffixed-line-length-132 -ff2c -fno-automatic -fdefault-real-8
24
+ INCLUDES=-I.
25
+ FFLAGS= $(INCLUDES) $(FFLAGSA)
26
+ FFLAG1=$(FFLAGS) -c
27
+ OTHERLIBS = -L$(CERN_ROOT)/lib $(CERNLIBS) -L/usr/lib64
28
+ # 64 vs 32 bit
29
+ # -L$(CERN_ROOT)/lib $(CERNLIBS) -L/usr/lib
30
+ FC := gfortran
31
+ F77 := gfortran
32
+ endif
33
+
34
+ %.o: %.f
35
+ $(F77) $(FFLAGS) -c $< -o $@
36
+
37
+ DEPEND_RULE = ( cat $< | sed -n -e \
38
+ "s|^[ ]*[Ii][Nn][Cc][Ll][Uu][Dd][Ee][ ]*['\"]|$@: $(@D)/|p" | \
39
+ sed -e "s|['\"].*$$||" | \
40
+ sed -e 's|.d:|.o:|') > $@
41
+
42
+ %.d: %.f
43
+ $(DEPEND_RULE)
44
+
45
+ none: make_ntuple $(my_deps)
46
+
47
+ all: make_ntuple $(my_deps)
48
+
49
+ include $(my_deps)
50
+
51
+ make_ntuple: $(my_objs) Makefile
52
+ $(F77) $(OSF_SHARED) -o $@ $(FFLAGS) $(my_objs) $(OTHERLIBS)
53
+
54
+ clean:
55
+ $(RM) *.[od] make_ntuple
56
+
Original file line number Diff line number Diff line change
1
+ ## This makefile must be executed with gmake (gnu make).
2
+
3
+ ## This tells make not to delete these target files on error/interrupt (see man page)
4
+ .PRECIOUS: *.o
5
+ RM = rm -f
6
+ SHELL = /bin/sh
7
+
8
+ OBJ = make_root_tree.o
9
+
10
+ my_objs = $(OBJ)
11
+
12
+ my_deps = $(my_objs:.o=.d)
13
+
14
+ MYOS := $(subst -,,$(shell uname))
15
+
16
+ #For use with gfortran compiler
17
+ # -fno-automatic - all program storage treated as static
18
+ ifeq ($(MYOS),Linux)
19
+ FFLAGSA=-
20
+ INCLUDES=
21
+ FFLAGS = -O3 -fno-automatic
22
+ OTHERLIBS =
23
+ FC := gfortran
24
+ F77 := gfortran
25
+ endif
26
+
27
+ CXX=g++
28
+ CXXFLAGS0 = -O3 -std=c++11
29
+ CXXFLAGS=$(CXXFLAGS0) $(DROOT)
30
+ ROOTDIR=$(ROOTSYS)
31
+ DMYROOT= -DMYROOT
32
+ ROOTLIBS := $(shell $(ROOTDIR)/bin/root-config --prefix=$(ROOTDIR) --libs)
33
+ ROOTINCLUDE := -I $(shell $(ROOTDIR)/bin/root-config --prefix=$(ROOTDIR) --incdir)
34
+
35
+ none: make_root_tree
36
+
37
+ all: make_root_tree
38
+
39
+ make_root_tree: $(my_objs) froot.co
40
+ $(F77) $(LDFLAGS) -o make_root_tree $(my_objs) $(OTHERLIBS) froot.co $(ROOTLIBS) -lImt -lvdt -ltbb $(OTHERLIBS) $(CERNLIBS) -L/usr/lib64 -lstdc++
41
+
42
+ %.o: %.f
43
+ $(FC) -c $(FFLAGS) $<
44
+
45
+ %.co: %.c
46
+ $(CXX) -c $(CXXFLAGS) $(DMYROOT) $(ROOTINCLUDE) -o $@ $<
47
+
48
+ clean:
49
+ $(RM) *.o *.co make_root_tree
50
+
Original file line number Diff line number Diff line change
1
+ ## This makefile must be executed with gmake (gnu make).
2
+
3
+ ## This tells make not to delete these target files on error/interrupt (see man page)
4
+ .PRECIOUS: *.o
5
+ RM = rm -f
6
+ SHELL = /bin/sh
7
+
8
+ OBJ = make_root_tree.o
9
+
10
+ my_objs = $(OBJ)
11
+
12
+ my_deps = $(my_objs:.o=.d)
13
+
14
+ MYOS := $(subst -,,$(shell uname))
15
+
16
+ #For use with gfortran compiler
17
+ # -fno-automatic - all program storage treated as static
18
+ ifeq ($(MYOS),Linux)
19
+ FFLAGSA=-
20
+ INCLUDES=
21
+ FFLAGS = -O3 -fno-automatic
22
+ OTHERLIBS =
23
+ FC := gfortran
24
+ F77 := gfortran
25
+ endif
26
+
27
+ ROOTSYS=/cvmfs/oasis.opensciencegrid.org/jlab/scicomp/sw/el9/root/6.30.04-gcc11.4.0
28
+ CXX=g++
29
+ CXXFLAGS0 = -O3 -std=c++17
30
+ CXXFLAGS=$(CXXFLAGS0) $(DROOT)
31
+ ROOTDIR=$(ROOTSYS)
32
+ DMYROOT= -DMYROOT
33
+ ROOTLIBS := $(shell $(ROOTDIR)/bin/root-config --prefix=$(ROOTDIR) --libs)
34
+ ROOTINCLUDE := -I $(shell $(ROOTDIR)/bin/root-config --prefix=$(ROOTDIR) --incdir)
35
+
36
+ none: make_root_tree
37
+
38
+ all: make_root_tree
39
+
40
+ make_root_tree: $(my_objs) froot.co
41
+ $(F77) $(LDFLAGS) -o make_root_tree $(my_objs) $(OTHERLIBS) froot.co $(ROOTLIBS) -lImt -lvdt -ltbb $(OTHERLIBS) $(CERNLIBS) -L/usr/lib64 -lstdc++
42
+
43
+ %.o: %.f
44
+ $(FC) -c $(FFLAGS) $<
45
+
46
+ %.co: %.c
47
+ $(CXX) -c $(CXXFLAGS) $(DMYROOT) $(ROOTINCLUDE) -o $@ $<
48
+
49
+ clean:
50
+ $(RM) *.o *.co make_root_tree
51
+
You can’t perform that action at this time.
0 commit comments