forked from MethodicalAcceleratorDesign/MAD-X
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile_lib
89 lines (72 loc) · 1.74 KB
/
Makefile_lib
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
# |
# o---------------------------------------------------------------------o
# |
# | MAD makefile - Libraries settings
# |
# o---------------------------------------------------------------------o
# |
# | Methodical Accelerator Design
# |
# | Copyright (c) 2011+ CERN, [email protected]
# |
# | For more information, see http://cern.ch/mad
# |
# o---------------------------------------------------------------------o
# |
# | $Id$
# |
# Online MAD-X
ifeq ($(ONLINE),yes)
LIBS += -Llib$(ARCH) -lSDDS1c -lSDDS1 -lrpnlib -lmdbmth -lmdblib -lgsl -lz
endif
# Libraries on Linux
ifeq ($(OSTYPE),Linux)
LIBS += $(if $(call eq,$(ARCH),32),$(call libdir,/usr/lib),) -lpthread
LDLIBS += -lstdc++ -lm
ifeq ($(X11),yes)
LIBS += -lX11
endif
endif
# Garbage Collector
ifeq ($(USEGC),yes)
LIBS += -Llibs$/gc -lgc-$(OSNAME)$(ARCH)$(if $(findstring -intel,$@),-intel,-gnu)
endif
# Libraries on MacOSX
ifeq ($(OSTYPE),Darwin)
ifeq ($(STATIC),yes)
ifeq ($(X11),yes)
X11PATH := /opt/local/lib/
X11LIBS := libX11.a libxcb.a libXau.a libXdmcp.a
ifneq ($(wildcard /opt/local/lib/),)
LIBS += $(wildcard $(addprefix $(X11PATH),$(X11LIBS)))
else
LIBS += $(call libdir,/usr/X11/lib) -lX11
endif
endif
# C/C++
GNULIBS := $(wildcard $(call GNULIB,libstdc++.a) $(call GNULIB,libgcc_eh.a))
ifneq ($(GNULIBS),)
LDLIBS += $(GNULIBS)
else
LDLIBS += -lstdc++ -lm
endif
else
ifeq ($(X11),yes)
LIBS += $(call libdir,/usr/X11/lib) -lX11
endif
LDLIBS += -lstdc++ -lm
endif
ifeq ($(LDNAME),ifort)
LDLIBS += -lc++
endif
endif
# Libraries on Windows
ifeq ($(OSTYPE),Windows)
ifneq ($(LDNAME),ifort)
LDLIBS += -lstdc++ -lm
endif
endif
ifeq ($(COVERAGE),yes)
LDLIBS += -lgcov
endif
# end of makefile