1 | # |
---|
2 | # -------- SUN --------- |
---|
3 | # |
---|
4 | ifeq ($(G4SYSTEM),SUN-CC) |
---|
5 | CXX := CC |
---|
6 | ifdef G4OPTIMISE |
---|
7 | CXXFLAGS := -xO2 |
---|
8 | else |
---|
9 | ifdef G4DEBUG |
---|
10 | CXXFLAGS := -g |
---|
11 | FCFLAGS := -g |
---|
12 | CCFLAGS := -g |
---|
13 | endif |
---|
14 | endif |
---|
15 | ifdef G4LIB_BUILD_SHARED |
---|
16 | CXXFLAGS += -KPIC |
---|
17 | FCFLAGS += -KPIC |
---|
18 | CCFLAGS += -KPIC |
---|
19 | endif |
---|
20 | CPPFLAGS += -DSOCKET_IRIX_SOLARIS |
---|
21 | CPPFLAGS += -DG4NOT_ISO_DELETES -DG4NO_ISO_VECDIST |
---|
22 | G4RUNPATHOPTION := -R |
---|
23 | FC := f77 |
---|
24 | SHEXT := so |
---|
25 | AR := $(CXX) -xar -o |
---|
26 | ECHO := /bin/echo |
---|
27 | GREP := /usr/xpg4/bin/grep |
---|
28 | FCLIBS := -lM77 -lF77 -lsunmath |
---|
29 | ifndef X11FLAGS |
---|
30 | X11FLAGS := -I/usr/openwin/include/X11/extensions -I/usr/openwin/include/X11 |
---|
31 | X11FLAGS += -I/usr/openwin/include |
---|
32 | endif |
---|
33 | ifndef X11LIBS |
---|
34 | X11LIBS := -L/usr/openwin/lib -L/usr/dt/lib -L/usr/ucblib |
---|
35 | X11LIBS += -R/usr/openwin/lib -lXmu -lX11 -lXext |
---|
36 | endif |
---|
37 | ifndef XMLIBS |
---|
38 | XMLIBS := -L/usr/openwin/lib -L/usr/dt/lib -L/usr/ucblib |
---|
39 | XMLIBS += -R/usr/openwin/lib -lXt -lXm -lX11 |
---|
40 | endif |
---|
41 | ifndef XAWFLAGS |
---|
42 | XAWFLAGS := -I/usr/openwin/include/X11 |
---|
43 | endif |
---|
44 | ifndef XAWLIBS |
---|
45 | XAWLIBS := -L/usr/openwin/lib -L/usr/dt/lib -L/usr/ucblib |
---|
46 | XAWLIBS += -R/usr/openwin/lib -lXaw -lXmu -lXt -lX11 -lXext |
---|
47 | endif |
---|
48 | ifndef OGLFLAGS |
---|
49 | OGLFLAGS := -I$(OGLHOME)/include |
---|
50 | endif |
---|
51 | ifndef OGLLIBS |
---|
52 | OGLLIBS := -L$(OGLHOME)/lib -lGLU -lGL |
---|
53 | endif |
---|
54 | LOADLIBS += -lsunmath -lsocket -lnsl |
---|
55 | |
---|
56 | define build-granular-shared-lib |
---|
57 | @libdir=`(cd $(@D);/bin/pwd)`; \ |
---|
58 | cd $(G4TMPDIR); \ |
---|
59 | $(CXX) -G $(CXXTEMPLATE_FLAGS) -o $$libdir/$(@F) -h $(@F) $(INTYLIBS) *.o |
---|
60 | endef |
---|
61 | define build-global-shared-lib |
---|
62 | @libdir=`(cd $(@D);/bin/pwd)`; \ |
---|
63 | cd $(G4TMP)/$(G4SYSTEM); \ |
---|
64 | $(CXX) -G $(CXXTEMPLATE_FLAGS) -o $$libdir/$(@F) -h $(@F) $(INTYLIBS) \ |
---|
65 | $(foreach dir,$(SUBLIBS),$(dir)/*.o); |
---|
66 | endef |
---|
67 | endif |
---|