1 | # $Id: G4UI_USE.gmk,v 1.15 2009/03/05 09:19:37 gbarrand Exp $ |
---|
2 | # ------------------------------------------------------------- |
---|
3 | # GNUmakefile for CPPFLAGS for interfaces USE phase. |
---|
4 | # John Allison, 6th July 1998. |
---|
5 | |
---|
6 | ifndef G4UI_NONE |
---|
7 | |
---|
8 | ifndef G4UI_USE_INCLUDED |
---|
9 | G4UI_USE_INCLUDED = 1 |
---|
10 | |
---|
11 | ifndef UILIBS |
---|
12 | UILIBS := |
---|
13 | endif |
---|
14 | |
---|
15 | # Sessions not needing external packages or libraries. These |
---|
16 | # libraries are always built (see G4UI_BUILD.gmk) and linked so the |
---|
17 | # user can instantiate one of these sessions without rebuilding the |
---|
18 | # libraries. For backwards compatibility with user code, as typified |
---|
19 | # by geant4/examples main programs, the C-pre-processor variables |
---|
20 | # corresponding to the original environment variables are set, but |
---|
21 | # there is no dependency in the Geant4 kernel; a user may instantiate |
---|
22 | # a session from this list without setting any environment variables. |
---|
23 | # However, if he/she sets no environment variables, then the |
---|
24 | # C-pre-processor variable G4UI_USE_TERMINAL is set by default, although |
---|
25 | # there is no need to use it. |
---|
26 | |
---|
27 | ifneq ($(G4INCLUDE_EXEC),1) |
---|
28 | CPPFLAGS += -I$(G4BASE)/interfaces/basic/include |
---|
29 | CPPFLAGS += -I$(G4BASE)/interfaces/common/include |
---|
30 | CPPFLAGS += -I$(G4BASE)/interfaces/GAG/include |
---|
31 | endif |
---|
32 | UILIBS += -lG4UIbasic |
---|
33 | UILIBS += -lG4UIcommon |
---|
34 | UILIBS += -lG4UIGAG |
---|
35 | |
---|
36 | ifdef G4UI_USE_TERMINAL |
---|
37 | G4UI_USE = 1 |
---|
38 | CPPFLAGS += -DG4UI_USE_TERMINAL |
---|
39 | endif |
---|
40 | |
---|
41 | ifdef G4UI_USE_TCSH |
---|
42 | G4UI_USE = 1 |
---|
43 | CPPFLAGS += -DG4UI_USE_TCSH |
---|
44 | endif |
---|
45 | |
---|
46 | ifdef G4UI_USE_GAG |
---|
47 | G4UI_USE = 1 |
---|
48 | CPPFLAGS += -DG4UI_USE_GAG |
---|
49 | endif |
---|
50 | |
---|
51 | # Other sessions: environment variables *must* be used to control the build |
---|
52 | # and the usage, becuase they need external packages or libraries. |
---|
53 | |
---|
54 | ifdef G4UI_USE_XM |
---|
55 | G4UI_USE = 1 |
---|
56 | G4INTY_USE_XT = 1 |
---|
57 | INC_XM = 1 |
---|
58 | LOAD_XM = 1 |
---|
59 | CPPFLAGS += -DG4UI_USE_XM |
---|
60 | endif |
---|
61 | |
---|
62 | ifdef G4UI_USE_QT |
---|
63 | G4UI_USE = 1 |
---|
64 | G4INTY_USE_QT = 1 |
---|
65 | INC_QT = 1 |
---|
66 | LOAD_QT = 1 |
---|
67 | CPPFLAGS += -DG4UI_USE_QT |
---|
68 | endif |
---|
69 | |
---|
70 | ifdef G4UI_USE_XAW |
---|
71 | G4UI_USE = 1 |
---|
72 | G4INTY_USE_XT = 1 |
---|
73 | INC_XAW = 1 |
---|
74 | LOAD_XAW = 1 |
---|
75 | CPPFLAGS += -DG4UI_USE_XAW |
---|
76 | endif |
---|
77 | |
---|
78 | ifdef G4UI_USE_WIN32 |
---|
79 | G4UI_USE = 1 |
---|
80 | G4INTY_USE_WIN32 = 1 |
---|
81 | CPPFLAGS += -DG4UI_USE_WIN32 |
---|
82 | endif |
---|
83 | |
---|
84 | ##################### Default to TERMINAL if no environment variables set ## |
---|
85 | |
---|
86 | ifndef G4UI_USE |
---|
87 | CPPFLAGS += -DG4UI_USE_TERMINAL |
---|
88 | endif |
---|
89 | |
---|
90 | ########################### and finally... ####################### |
---|
91 | |
---|
92 | G4UI_USE = 1 |
---|
93 | CPPFLAGS += -DG4UI_USE |
---|
94 | |
---|
95 | endif # G4UI_USE_INCLUDED |
---|
96 | endif # G4UI_NONE |
---|