forked from OpenGATE/Gate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
64 lines (47 loc) · 1.41 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
CXX := g++
LD := g++
CP := cp
RM := rm -rf
MAINSOURCES := $(wildcard *.cc)
SOURCES := $(wildcard ./src/*.cc)
MAINOBJECTS := $(patsubst %.cc, tmp/%.o, $(notdir $(MAINSOURCES)))
OBJECTS := $(patsubst %.cc, tmp/%.o, $(notdir $(SOURCES)))
vpath %.hh ./include
vpath %.cc ./src
CXXFLAGS := -DGC_DEFAULT_PLATFORM=\"condor\"
INCLUDE := -I./include `geant4-config --cflags`
LDFLAGS := `geant4-config --libs`
TARGET := gjs
.PHONY: all clean directories cleanall install uninstall
all: directories $(TARGET)
@echo Done
directories:
@if test ! -f tmp;\
then mkdir -p tmp;\
fi
$(TARGET): $(MAINOBJECTS) $(OBJECTS)
@echo Linking...
@$(LD) -o $@ $^ $(INCLUDE) $(LDFLAGS)
tmp/gjs.o: gjs.cc GateSplitManager.hh
@echo Compiling $(notdir $<)...
@$(CXX) -o $@ -c $< $(INCLUDE) $(CXXFLAGS)
tmp/GateMacfileParser.o: GateMacfileParser.cc GateMacfileParser.hh
@echo Compiling $(notdir $<)...
@$(CXX) -o $@ -c $< $(INCLUDE) $(CXXFLAGS)
tmp/GateSplitManager.o: GateSplitManager.cc GateSplitManager.hh
@echo Compiling $(notdir $<)...
@$(CXX) -o $@ -c $< $(INCLUDE) $(CXXFLAGS)
tmp/GateToPlatform.o: GateToPlatform.cc GateToPlatform.hh
@echo Compiling $(notdir $<)...
@$(CXX) -o $@ -c $< $(INCLUDE) $(CXXFLAGS)
clean:
@echo Cleaning...
@$(RM) $(OBJECTS) $(TARGET) $(MAINOBJECTS)
cleanall: clean
@$(RM) tmp
install:
@echo Installing ...
@$(CP) $(TARGET) /usr/local/bin
uninstall:
@echo Uninstalling...
@$(RM) /usr/local/bin/$(TARGET)