source: PSPA/madxPSPA/make/linker.ifort @ 478

Last change on this file since 478 was 430, checked in by touze, 11 years ago

import madx-5.01.00

File size: 2.1 KB
Line 
1# |
2# o---------------------------------------------------------------------o
3# |
4# | MAD makefile - ifort linker settings
5# |
6# o---------------------------------------------------------------------o
7# |
8# | Methodical Accelerator Design
9# |
10# | Copyright (c) 2011+ CERN, mad@cern.ch
11# |
12# | For more information, see http://cern.ch/mad
13# |
14# o---------------------------------------------------------------------o
15# |
16# | $Id$
17# |
18
19################
20# Unix Settings
21#
22ifneq ($(OSTYPE),Windows)
23
24#
25# linker flags
26#
27
28LDFLAGS = -m$(ARCH) -O$(NOPT) -nofor-main -static-intel -static-libgcc
29LDLIBS  =
30
31ifneq ($(CXXNAME),)
32LDFLAG += -cxxlib
33LDLIBS += -lstdc++$(if $(call eq,$(OSTYPE),Darwin),-static,)
34endif
35
36ifeq ($(OSTYPE),Darwin)
37LDFLAGS += -isysroot /Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.5
38ifeq ($(ARCH),32)
39LDLIBS += -L$(GNULIBDIR) -lgcc_eh
40endif
41endif
42
43#
44# options flags
45#
46
47ifeq ($(DEBUG),yes)
48LDFLAGS += -g -gdwarf-2 -check all
49endif
50
51ifeq ($(PROFILE),yes)
52LDFLAGS += -p
53endif
54
55ifeq ($(STATIC),yes) # build static library
56LDFLAGS += -static$(if $(call eq,$(OSTYPE),Darwin),lib,)
57endif
58
59ifeq ($(SHARED),yes) # build shared library
60LDFLAGS += $(if $(call eq,$(OSTYPE),Darwin),-dynamiclib,-shared) -fPIC
61ifeq ($(OSTYPE),Linux)
62LDLIBS  += -lifcore_pic -lifcoremt_pic
63endif
64endif
65
66ifeq ($(PLUGIN),yes) # allow to load dynamically shared library (plugin)
67LDFLAGS += -Bdynamic
68LDLIBS  += -ldl
69endif
70
71endif # Unix Settings
72
73# |
74# o---------------------------------------------------------------------o
75# |
76
77###################
78# Windows Settings
79#
80ifeq ($(OSTYPE),Windows)
81
82#
83# linker flags
84#
85
86LDFLAGS = /nologo /O$(NOPT) /extlnk:.o
87LDLIBS  =
88
89#
90# options flags
91#
92
93ifeq ($(DEBUG),yes)
94LDFLAGS += /debug:full /check:all
95endif
96
97ifeq ($(PROFILE),yes)
98LDFLAGS += /Qprof-use
99endif
100
101ifeq ($(STATIC),yes)
102LDFLAGS += /static
103endif
104
105ifeq ($(SHARED),yes)
106LDFLAGS += /shared
107endif
108
109#
110# command translator
111#
112
113LD_tr = $(strip $(subst $(SPACE)/O0 , /Od ,$(subst $(SPACE)-o , /Fe,$1)))
114
115endif # Windows Settings
116
117# end of makefile
Note: See TracBrowser for help on using the repository browser.