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 | |
---|
23 | LDFLAGS = -m$(ARCH) -O$(NOPT) |
---|
24 | LDLIBS = |
---|
25 | |
---|
26 | ifeq ($(ARCH),32) |
---|
27 | # attemp to find the gnu libs directory for Lahey 32 bits! (GCC only) |
---|
28 | LDLIBS += -L$(GNULIBDIR) |
---|
29 | endif |
---|
30 | |
---|
31 | ifneq ($(CXXNAME),) |
---|
32 | ifeq ($(ARCH),32) |
---|
33 | # required by __constructor/__destructor attributes |
---|
34 | LDLIBS += $(GNULIBDIR)$/crt*S.o |
---|
35 | endif |
---|
36 | LDLIBS += -lstdc++ |
---|
37 | endif |
---|
38 | |
---|
39 | ifeq ($(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 |
---|
48 | endif |
---|
49 | |
---|
50 | # |
---|
51 | # options flags |
---|
52 | # |
---|
53 | |
---|
54 | ifeq ($(DEBUG),yes) |
---|
55 | LDFLAGS += -g --info --ap --chkglobal --lst --trap |
---|
56 | endif |
---|
57 | |
---|
58 | ifeq ($(PROFILE),yes) # not found in the doc |
---|
59 | LDFLAGS += -pg |
---|
60 | endif |
---|
61 | |
---|
62 | ifeq ($(STATIC),yes) |
---|
63 | LDFLAGS += -static |
---|
64 | endif |
---|
65 | |
---|
66 | ifeq ($(PLUGIN),yes) # not found in the doc |
---|
67 | LDFLAGS += -dynamic |
---|
68 | LDLIBS += -ldl |
---|
69 | endif |
---|
70 | |
---|
71 | # end of makefile |
---|
72 | |
---|
Note: See
TracBrowser
for help on using the repository browser.