1 | # $Id: GNUmakefile,v 1.10 2006/11/10 21:04:51 duns Exp $ |
---|
2 | # -------------------------------------------------------------- |
---|
3 | # GNUmakefile for examples module |
---|
4 | # -------------------------------------------------------------- |
---|
5 | |
---|
6 | name := A01app |
---|
7 | G4TARGET := $(name) |
---|
8 | G4EXLIB := true |
---|
9 | |
---|
10 | ifndef G4INSTALL |
---|
11 | G4INSTALL = ../../../.. |
---|
12 | endif |
---|
13 | |
---|
14 | .PHONY: all |
---|
15 | all: lib bin |
---|
16 | |
---|
17 | # |
---|
18 | # A01 uses its own physics lists. |
---|
19 | # |
---|
20 | |
---|
21 | #OSC:begin |
---|
22 | # OpenScientist compilation and link flags : |
---|
23 | # Disconnect the usage of other GUIs : |
---|
24 | G4UI_USE_TERMINAL := |
---|
25 | G4UI_USE_XM := |
---|
26 | G4UI_USE_XAW := |
---|
27 | G4UI_USE_QT := |
---|
28 | G4UI_USE_WIN32 := |
---|
29 | G4UI_USE_TCSH := |
---|
30 | G4UI_USE_GAG := |
---|
31 | G4UI_USE_OSC := |
---|
32 | # Disconnect the usage of vis drivers that may interfer : |
---|
33 | G4VIS_USE_OPENGLX := |
---|
34 | G4VIS_USE_OPENGLXM := |
---|
35 | G4VIS_USE_OPENGLWIN32 := |
---|
36 | G4VIS_USE_OIX := |
---|
37 | G4VIS_USE_OIWIN32 := |
---|
38 | G4VIS_USE_OPACS := |
---|
39 | CPPFLAGS += `osc-config --g4lab_incs` |
---|
40 | INTYLIBS += $(shell osc-config --g4lab_libs) |
---|
41 | INTYLIBS += `osc-config --iv_libs` |
---|
42 | |
---|
43 | # Enable OpenScientist AIDA implementation : |
---|
44 | G4ANALYSIS_USE := 1 |
---|
45 | G4ANALYSIS_AIDA_CONFIG_CFLAGS = `aida-config --include` |
---|
46 | G4ANALYSIS_AIDA_CONFIG_LIBS = `OnXLab_aida_config --libs` |
---|
47 | #G4ANALYSIS_AIDA_CONFIG_LIBS = `OnXLab_aida_config --libs` |
---|
48 | #OSC:end |
---|
49 | |
---|
50 | include $(G4INSTALL)/config/binmake.gmk |
---|
51 | |
---|
52 | CXXFLAGS_WITHOUT_O := $(filter-out -O% , $(CXXFLAGS)) |
---|
53 | CXXFLAGS_WITHOUT_O := $(filter-out +O% , $(CXXFLAGS_WITHOUT_O)) |
---|
54 | |
---|
55 | # |
---|
56 | # A01HadronPhysics fails to compile in optimized mode on Linux, Darwin, using g++ |
---|
57 | # so it needs this special rule. Hans-Peter Wellish. |
---|
58 | # |
---|
59 | ifeq ($(G4SYSTEM),Linux-g++) |
---|
60 | A01HADRON_NO_OPTIMIZE = 1 |
---|
61 | endif |
---|
62 | ifeq ($(G4SYSTEM),Linux-g++2) |
---|
63 | A01HADRON_NO_OPTIMIZE = 1 |
---|
64 | endif |
---|
65 | ifeq ($(G4SYSTEM),Linux-g++3) |
---|
66 | A01HADRON_NO_OPTIMIZE = 1 |
---|
67 | endif |
---|
68 | ifeq ($(G4SYSTEM),Darwin-g++) |
---|
69 | A01HADRON_NO_OPTIMIZE = 1 |
---|
70 | endif |
---|
71 | ifeq ($(G4SYSTEM),Darwin-g++2) |
---|
72 | A01HADRON_NO_OPTIMIZE = 1 |
---|
73 | endif |
---|
74 | ifeq ($(G4SYSTEM),Darwin-g++3) |
---|
75 | A01HADRON_NO_OPTIMIZE = 1 |
---|
76 | endif |
---|
77 | |
---|
78 | ifdef A01HADRON_NO_OPTIMIZE |
---|
79 | $(G4TMP)/$(G4SYSTEM)/$(name)/A01HadronPhysics.o: src/A01HadronPhysics.cc |
---|
80 | @echo "Compiling A01HadronPhysics.cc without optimization..." |
---|
81 | @$(CXX) $(CXXFLAGS_WITHOUT_O) $(CPPFLAGS) -c $(OUT_OBJ)$@ src/A01HadronPhysics.cc |
---|
82 | endif |
---|
83 | |
---|
84 | ifdef G4ANALYSIS_USE |
---|
85 | CPPFLAGS += `aida-config --include` |
---|
86 | LDLIBS += `aida-config --lib` |
---|
87 | endif |
---|