source: PSPA/madxPSPA/make/linker.lf95 @ 476

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

import madx-5.01.00

File size: 1.5 KB
Line 
1# |
2# o---------------------------------------------------------------------o
3# |
4# | MAD makefile - lf95 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# linker flags
21#
22
23LDFLAGS = -m$(ARCH) -O$(NOPT)
24LDLIBS  =
25
26ifeq ($(ARCH),32)
27  # attemp to find the gnu libs directory for Lahey 32 bits! (GCC only)
28  LDLIBS += -L$(GNULIBDIR)
29endif
30
31ifneq ($(CXXNAME),)
32  ifeq ($(ARCH),32)
33    # required by __constructor/__destructor attributes
34    LDLIBS += $(GNULIBDIR)$/crt*S.o
35  endif
36  LDLIBS += -lstdc++
37endif
38
39ifeq ($(STATIC),yes)
40  ifeq ($(ARCH),32)
41    # Lahey 32 bits (hidden) libs are asking for symbols during last linking step
42    # It probably uses partial link and discards everthing in the final step
43    # Hence, ld groups do not work and required symbols must be specified by hand...
44    REQSYM := __divdi3 __udivdi3 __moddi3 __umoddi3
45    REQCMD := -Wl,--undefined=
46    LDLIBS += $(addprefix $(REQCMD),$(REQSYM)) -lc -lgcc_eh -lgcc
47  endif
48endif
49
50#
51# options flags
52#
53
54ifeq ($(DEBUG),yes)
55LDFLAGS += -g --info --ap --chkglobal --lst --trap
56endif
57
58ifeq ($(PROFILE),yes) # not found in the doc
59LDFLAGS += -pg
60endif
61
62ifeq ($(STATIC),yes)
63LDFLAGS += -static
64endif
65
66ifeq ($(PLUGIN),yes) # not found in the doc
67LDFLAGS += -dynamic
68LDLIBS  += -ldl
69endif
70
71# end of makefile
72
Note: See TracBrowser for help on using the repository browser.