[850] | 1 | # $Id: G4UI_USE.gmk,v 1.12 2008/05/14 09:48:19 gbarrand Exp $ |
---|
[472] | 2 | # ------------------------------------------------------------- |
---|
| 3 | # GNUmakefile for CPPFLAGS for interfaces USE phase. |
---|
| 4 | # John Allison, 6th July 1998. |
---|
| 5 | |
---|
| 6 | ########################### interfaces/basic ####################### |
---|
| 7 | ifndef G4UI_USE_INCLUDED |
---|
| 8 | G4UI_USE_INCLUDED = 1 |
---|
| 9 | |
---|
| 10 | ifndef G4UI_NONE |
---|
| 11 | |
---|
| 12 | UILIBS := |
---|
| 13 | |
---|
| 14 | # Sessions not needing external packages or libraries. These |
---|
| 15 | # libraries are always built (see G4UI_BUILD.gmk) and linked so the |
---|
| 16 | # user can instantiate one of these sessions without rebuilding the |
---|
| 17 | # libraries. For backwards compatibility with user code, as typified |
---|
| 18 | # by geant4/examples main programs, the C-pre-processor variables |
---|
| 19 | # corresponding to the original environment variables are set, but |
---|
| 20 | # there is no dependency in the Geant4 kernel; a user may instantiate |
---|
| 21 | # a session from this list without setting any environment variables. |
---|
| 22 | # However, if he/she sets no environment variables, then the |
---|
| 23 | # C-pre-processor variable G4UI_USE_TERMINAL is set by default, although |
---|
| 24 | # there is no need to use it. |
---|
| 25 | |
---|
| 26 | ifneq ($(G4INCLUDE_EXEC),1) |
---|
| 27 | CPPFLAGS += -I$(G4BASE)/interfaces/basic/include |
---|
| 28 | CPPFLAGS += -I$(G4BASE)/interfaces/common/include |
---|
| 29 | CPPFLAGS += -I$(G4BASE)/interfaces/GAG/include |
---|
| 30 | endif |
---|
| 31 | UILIBS += -lG4UIbasic |
---|
| 32 | UILIBS += -lG4UIcommon |
---|
| 33 | UILIBS += -lG4UIGAG |
---|
| 34 | |
---|
| 35 | ifdef G4UI_USE_TERMINAL |
---|
| 36 | G4UI_USE = 1 |
---|
| 37 | CPPFLAGS += -DG4UI_USE_TERMINAL |
---|
| 38 | endif |
---|
| 39 | |
---|
| 40 | ifdef G4UI_USE_TCSH |
---|
| 41 | G4UI_USE = 1 |
---|
| 42 | CPPFLAGS += -DG4UI_USE_TCSH |
---|
| 43 | endif |
---|
| 44 | |
---|
| 45 | ifdef G4UI_USE_GAG |
---|
| 46 | G4UI_USE = 1 |
---|
| 47 | CPPFLAGS += -DG4UI_USE_GAG |
---|
| 48 | endif |
---|
| 49 | |
---|
| 50 | # Other sessions: environment variables *must* be used to control the build |
---|
| 51 | # and the usage, becuase they need external packages or libraries. |
---|
| 52 | |
---|
| 53 | ifdef G4UI_USE_XM |
---|
| 54 | G4UI_USE = 1 |
---|
| 55 | G4INTY_USE_XT = 1 |
---|
| 56 | INC_XM = 1 |
---|
| 57 | LOAD_XM = 1 |
---|
| 58 | CPPFLAGS += -DG4UI_USE_XM |
---|
| 59 | endif |
---|
| 60 | |
---|
[486] | 61 | ifdef G4UI_USE_QT |
---|
| 62 | G4UI_USE = 1 |
---|
| 63 | G4INTY_USE_QT = 1 |
---|
| 64 | INC_QT = 1 |
---|
| 65 | LOAD_QT = 1 |
---|
| 66 | CPPFLAGS += -DG4UI_USE_QT |
---|
| 67 | endif |
---|
| 68 | |
---|
[472] | 69 | ifdef G4UI_USE_XAW |
---|
| 70 | G4UI_USE = 1 |
---|
| 71 | G4INTY_USE_XT = 1 |
---|
| 72 | INC_XAW = 1 |
---|
| 73 | LOAD_XAW = 1 |
---|
| 74 | CPPFLAGS += -DG4UI_USE_XAW |
---|
| 75 | endif |
---|
| 76 | |
---|
| 77 | ifdef G4UI_USE_WIN32 |
---|
| 78 | G4UI_USE = 1 |
---|
| 79 | G4INTY_USE_WIN32 = 1 |
---|
| 80 | CPPFLAGS += -DG4UI_USE_WIN32 |
---|
| 81 | endif |
---|
| 82 | |
---|
[850] | 83 | ifdef G4UI_USE_OSC |
---|
| 84 | CPPFLAGS += -DG4UI_USE_OSC |
---|
| 85 | ifneq (,$(findstring WIN32-VC,$(G4SYSTEM))) |
---|
| 86 | # need a syntax that both g++ and CL.exe understand : |
---|
| 87 | G4OSC_TMP_1 := $(shell echo "`osc-config --g4lab_incs`") |
---|
| 88 | CPPFLAGS += $(patsubst /I%,-I"%",$(G4OSC_TMP_1)) |
---|
| 89 | else |
---|
| 90 | CPPFLAGS += `osc-config --g4lab_incs` |
---|
| 91 | endif |
---|
| 92 | INTYLIBS += `osc-config --g4lab_libs` |
---|
| 93 | INTYLIBS += `osc-config --iv_libs` |
---|
| 94 | # |
---|
| 95 | ifndef G4ANALYSIS_AIDA_CONFIG_CFLAGS |
---|
| 96 | ifneq (,$(findstring WIN32-VC,$(G4SYSTEM))) |
---|
| 97 | # need a syntax that both g++ and CL.exe understand : |
---|
| 98 | G4OSC_TMP_2 := $(shell echo "`aida-config --include`") |
---|
| 99 | G4ANALYSIS_AIDA_CONFIG_CFLAGS := $(patsubst /I%,-I"%",$(G4OSC_TMP_2)) |
---|
| 100 | endif |
---|
| 101 | endif |
---|
| 102 | endif |
---|
| 103 | |
---|
[472] | 104 | ########################### interfaces/XVT - not currently implemented ##### |
---|
| 105 | |
---|
| 106 | ##################### Default to TERMINAL if no environment variables set ## |
---|
| 107 | ##################### (No need actually to use it - see above.) ############ |
---|
| 108 | |
---|
| 109 | ifndef G4UI_USE |
---|
| 110 | G4UI_USE = 1 |
---|
| 111 | CPPFLAGS += -DG4UI_USE_TERMINAL |
---|
| 112 | endif |
---|
| 113 | |
---|
| 114 | endif #G4UI_NONE |
---|
| 115 | endif # G4UI_USE_INCLUDED |
---|