mirror of
https://github.com/gwm17/Mask.git
synced 2024-11-22 10:18:50 -05:00
Added premake to generate makefiles to improve compatibility. Separated detector source code into a subdirectory.
This commit is contained in:
parent
c5ff59a242
commit
0bafaa3b2e
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -10,6 +10,8 @@
|
|||
*.o
|
||||
*.swp
|
||||
.DS_Store
|
||||
Makefile
|
||||
*.make
|
||||
|
||||
|
||||
###Keep this file###
|
||||
|
|
43
makefile
43
makefile
|
@ -1,43 +0,0 @@
|
|||
CC=g++
|
||||
ROOTGEN=rootcint
|
||||
CFLAGS=-g -Wall `root-config --cflags`
|
||||
CPPFLAGS=-I ./include
|
||||
LDFLAGS=`root-config --glibs`
|
||||
|
||||
ROOTINCLDIR=./
|
||||
INCLDIR=./include
|
||||
SRCDIR=./src
|
||||
OBJDIR=./objs
|
||||
BINDIR=./bin
|
||||
|
||||
SRC=$(wildcard $(SRCDIR)/*.cpp)
|
||||
OBJS=$(SRC:$(SRCDIR)/%.cpp=$(OBJDIR)/%.o)
|
||||
|
||||
DICTOBJ=$(OBJDIR)/kinematics_dict.o
|
||||
DICTSRC=$(SRCDIR)/kinematics_dict.cxx
|
||||
DICT_PAGES=$(INCLDIR)/Kinematics.h $(INCLDIR)/LinkDef_Kinematics.h
|
||||
|
||||
EXE=$(BINDIR)/mask
|
||||
|
||||
CLEANUP=$(EXE) $(OBJS) $(DICTOBJ) $(DICTSRC)
|
||||
|
||||
.PHONY: all clean
|
||||
|
||||
all: $(EXE) $(TPEXE)
|
||||
|
||||
$(EXE): $(DICTOBJ) $(OBJS)
|
||||
$(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS)
|
||||
|
||||
$(DICTOBJ): $(DICTSRC)
|
||||
$(CC) $(CFLAGS) $(CPPFLAGS) -I $(ROOTINCLDIR) -c $^ -o $@
|
||||
mv $(SRCDIR)/*.pcm $(BINDIR)
|
||||
|
||||
$(DICTSRC): $(DICT_PAGES)
|
||||
$(ROOTGEN) -f $@ $^
|
||||
|
||||
VPATH= $(SRCDIR):./testplots/
|
||||
$(OBJDIR)/%.o: %.cpp
|
||||
$(CC) $(CFLAGS) $(CPPFLAGS) -c $^ -o $@
|
||||
|
||||
clean:
|
||||
$(RM) $(CLEANUP) $(BINDIR)/%.pcm
|
36
premake5.lua
Normal file
36
premake5.lua
Normal file
|
@ -0,0 +1,36 @@
|
|||
workspace "Mask"
|
||||
configurations {
|
||||
"Debug",
|
||||
"Release"
|
||||
}
|
||||
|
||||
project "Mask"
|
||||
kind "ConsoleApp"
|
||||
language "C++"
|
||||
targetdir "bin"
|
||||
objdir "objs"
|
||||
cppdialect "C++11"
|
||||
|
||||
files {
|
||||
"src/**.cpp",
|
||||
"include/**.h",
|
||||
"src/**.cxx"
|
||||
}
|
||||
|
||||
includedirs {
|
||||
"include",
|
||||
"./"
|
||||
}
|
||||
|
||||
buildoptions {
|
||||
"`root-config --cflags`"
|
||||
}
|
||||
|
||||
linkoptions {
|
||||
"`root-config --glibs`"
|
||||
}
|
||||
|
||||
prebuildcommands {
|
||||
"rootcint -f src/kinematics_dict.cxx include/Kinematics.h include/LinkDef_Kinematics.h",
|
||||
"{MOVE} src/kinematics_dict_rdict.pcm bin/"
|
||||
}
|
Loading…
Reference in New Issue
Block a user