OS checker on makefile
This commit is contained in:
parent
f001bb21e0
commit
b4eb81a0ec
BIN
Armory/.DS_Store
vendored
Normal file
BIN
Armory/.DS_Store
vendored
Normal file
Binary file not shown.
20
Armory/AnasenMS.dSYM/Contents/Info.plist
Normal file
20
Armory/AnasenMS.dSYM/Contents/Info.plist
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.apple.xcode.dsym.AnasenMS</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>dSYM</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
triple: 'arm64-apple-darwin'
|
||||
binary-path: AnasenMS
|
||||
relocations: []
|
||||
...
|
||||
|
|
@ -1,40 +1,74 @@
|
|||
########################################################################
|
||||
#
|
||||
#
|
||||
#########################################################################
|
||||
# Cross-platform Makefile (macOS + Linux)
|
||||
########################################################################
|
||||
|
||||
CC = g++
|
||||
UNAME_S := $(shell uname -s)
|
||||
|
||||
#COPTS = -fPIC -DLINUX -O2 -std=c++17 -lpthread
|
||||
COPTS = -fPIC -DLINUX -g -O0 -Wall -std=c++17 -lpthread
|
||||
########################################################################
|
||||
# Defaults
|
||||
########################################################################
|
||||
|
||||
ifeq ($(UNAME_S),Darwin)
|
||||
|
||||
########################################################################
|
||||
# macOS (Homebrew + Apple Clang)
|
||||
########################################################################
|
||||
|
||||
SDKROOT := $(shell xcrun --show-sdk-path)
|
||||
|
||||
CXX := clang++
|
||||
|
||||
ROOTCFLAGS := $(shell root-config --cflags | sed 's/-stdlib=libc++//g')
|
||||
ROOTLIBS := $(shell root-config --libs | sed 's/-stdlib=libc++//g')
|
||||
|
||||
CXXFLAGS := -g -O0 -Wall -std=c++17 -fPIC
|
||||
CXXFLAGS += $(ROOTCFLAGS)
|
||||
CXXFLAGS += -isysroot $(SDKROOT)
|
||||
CXXFLAGS += -I$(SDKROOT)/usr/include/c++/v1
|
||||
|
||||
LDFLAGS := $(shell root-config --glibs) -lGeom -lEve -lGui
|
||||
|
||||
else
|
||||
|
||||
########################################################################
|
||||
# Linux (system g++)
|
||||
########################################################################
|
||||
|
||||
CXX := g++
|
||||
|
||||
COPTS := -fPIC -DLINUX -g -O0 -Wall -std=c++17 -pthread
|
||||
|
||||
ROOTCFLAGS := $(shell root-config --cflags)
|
||||
ROOTLIBS := $(shell root-config --libs)
|
||||
|
||||
CXX := g++
|
||||
CXXFLAGS := -O2 $(ROOTCFLAGS)
|
||||
CXXFLAGS := $(COPTS) $(ROOTCFLAGS)
|
||||
LDFLAGS := $(ROOTLIBS) -lGeom -lEve -lGui
|
||||
|
||||
ALL = Mapper EventBuilder#AnasenMS
|
||||
endif
|
||||
|
||||
#########################################################################
|
||||
########################################################################
|
||||
# Targets
|
||||
########################################################################
|
||||
|
||||
all : $(ALL)
|
||||
ALL = Mapper EventBuilder AnasenMS
|
||||
|
||||
clean :
|
||||
/bin/rm -f $(OBJS) $(ALL)
|
||||
all: $(ALL)
|
||||
|
||||
Mapper : Mapper.cpp ../mapping.h ClassDet.h
|
||||
clean:
|
||||
/bin/rm -f $(ALL)
|
||||
|
||||
########################################################################
|
||||
# Build rules
|
||||
########################################################################
|
||||
|
||||
Mapper: Mapper.cpp ../mapping.h ClassDet.h
|
||||
@echo "--------- making Mapper"
|
||||
$(CC) $(COPTS) $(ROOTCFLAGS) -o Mapper Mapper.cpp $(ROOTLIBS)
|
||||
$(CXX) $(CXXFLAGS) Mapper.cpp -o Mapper $(LDFLAGS)
|
||||
|
||||
AnasenMS : constant.h Isotope.h ClassTransfer.h ClassSX3.h ClassPW.h ClassAnasen.h anasenMS.cpp
|
||||
@echo "--------- making ANASEN Monte Carlo"
|
||||
$(CC) $(COPTS) $(ROOTCFLAGS) -o AnasenMS anasenMS.cpp $(ROOTLIBS) -lEve -lGui -lGeom
|
||||
|
||||
EventBuilder : EventBuilder.cpp ClassData.h fsuReader.h Hit.h
|
||||
EventBuilder: EventBuilder.cpp ClassData.h fsuReader.h Hit.h
|
||||
@echo "--------- making EventBuilder"
|
||||
$(CC) $(COPTS) -o EventBuilder EventBuilder.cpp $(ROOTLIBS)
|
||||
|
||||
#anasenMS: anasenMS.cpp
|
||||
# $(CXX) $(CXXFLAGS) anasenMS.cpp -o anasenMS $(ROOTLIBS)
|
||||
$(CXX) $(CXXFLAGS) EventBuilder.cpp -o EventBuilder $(LDFLAGS)
|
||||
|
||||
AnasenMS: anasenMS.cpp constant.h Isotope.h ClassTransfer.h ClassSX3.h ClassPW.h ClassAnasen.h
|
||||
@echo "--------- making ANASEN Monte Carlo"
|
||||
$(CXX) $(CXXFLAGS) anasenMS.cpp -o AnasenMS $(LDFLAGS)
|
||||
20
Armory/Mapper.dSYM/Contents/Info.plist
Normal file
20
Armory/Mapper.dSYM/Contents/Info.plist
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.apple.xcode.dsym.Mapper</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>dSYM</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
triple: 'arm64-apple-darwin'
|
||||
binary-path: Mapper
|
||||
relocations: []
|
||||
...
|
||||
|
|
@ -45,7 +45,7 @@ bool IsDeadSX3(int id){
|
|||
return dead.count(id);
|
||||
}
|
||||
|
||||
static std::set<pair<int,int>> ReactionProductb = { {1,1} }; // add reaction product b (light particle) A,Z pairs here, e.g. {1,1} for proton, {4,2} for alpha
|
||||
static std::set<pair<int,int>> ReactionProductb = { {4,2} }; // add reaction product b (light particle) A,Z pairs here, e.g. {1,1} for proton, {4,2} for alpha
|
||||
|
||||
int main(int argc, char **argv){
|
||||
|
||||
|
|
@ -88,7 +88,7 @@ int main(int argc, char **argv){
|
|||
transfer.SetIncidentEnergyAngle((42.82/14.0), 0, 0); // arguments are KEA in MeV/u, theta and phi in degree
|
||||
transfer.Seta( 4, 2); // identify reaction product a in internal indexing e.g., 4He (alpha)
|
||||
transfer.Setb(ReactionProductb.begin()->first, ReactionProductb.begin()->second); // identify reaction product b e.g., 1H (proton)
|
||||
transfer.SetB(17, 8); // identify reaction product B e.g., 23Na (Z=11)
|
||||
transfer.SetB(14, 7); // identify reaction product B e.g., 23Na (Z=11)
|
||||
|
||||
// TODO add alpha source or alternative reaction channel selection
|
||||
|
||||
|
|
|
|||
BIN
ELoss/.DS_Store
vendored
Normal file
BIN
ELoss/.DS_Store
vendored
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user