[1230] | 1 | # $Id: GNUmakefile,v 1.11 2009/03/05 09:21:30 gbarrand Exp $ |
---|
[807] | 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 | include $(G4INSTALL)/config/binmake.gmk |
---|
| 22 | |
---|
| 23 | CXXFLAGS_WITHOUT_O := $(filter-out -O% , $(CXXFLAGS)) |
---|
| 24 | CXXFLAGS_WITHOUT_O := $(filter-out +O% , $(CXXFLAGS_WITHOUT_O)) |
---|
| 25 | |
---|
| 26 | # |
---|
| 27 | # A01HadronPhysics fails to compile in optimized mode on Linux, Darwin, using g++ |
---|
| 28 | # so it needs this special rule. Hans-Peter Wellish. |
---|
| 29 | # |
---|
| 30 | ifeq ($(G4SYSTEM),Linux-g++) |
---|
| 31 | A01HADRON_NO_OPTIMIZE = 1 |
---|
| 32 | endif |
---|
| 33 | ifeq ($(G4SYSTEM),Linux-g++2) |
---|
| 34 | A01HADRON_NO_OPTIMIZE = 1 |
---|
| 35 | endif |
---|
| 36 | ifeq ($(G4SYSTEM),Linux-g++3) |
---|
| 37 | A01HADRON_NO_OPTIMIZE = 1 |
---|
| 38 | endif |
---|
| 39 | ifeq ($(G4SYSTEM),Darwin-g++) |
---|
| 40 | A01HADRON_NO_OPTIMIZE = 1 |
---|
| 41 | endif |
---|
| 42 | ifeq ($(G4SYSTEM),Darwin-g++2) |
---|
| 43 | A01HADRON_NO_OPTIMIZE = 1 |
---|
| 44 | endif |
---|
| 45 | ifeq ($(G4SYSTEM),Darwin-g++3) |
---|
| 46 | A01HADRON_NO_OPTIMIZE = 1 |
---|
| 47 | endif |
---|
| 48 | |
---|
| 49 | ifdef A01HADRON_NO_OPTIMIZE |
---|
| 50 | $(G4TMP)/$(G4SYSTEM)/$(name)/A01HadronPhysics.o: src/A01HadronPhysics.cc |
---|
| 51 | @echo "Compiling A01HadronPhysics.cc without optimization..." |
---|
| 52 | @$(CXX) $(CXXFLAGS_WITHOUT_O) $(CPPFLAGS) -c $(OUT_OBJ)$@ src/A01HadronPhysics.cc |
---|
| 53 | endif |
---|
| 54 | |
---|