source: PSPA/madxPSPA/make/compiler.gcc @ 430

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

import madx-5.01.00

File size: 1.3 KB
Line 
1# |
2# o---------------------------------------------------------------------o
3# |
4# | MAD makefile - gcc compiler 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# makedep
21#
22
23CDEP = $(CC) -MM $(addprefix -I,$(CC_DIR))
24
25#
26# preprocessor flags
27#
28
29CPPFLAGS += -D_GCC
30
31#
32# compiler flags
33#
34
35CFLAGS = -m$(ARCH) -O$(NOPT) -std=c99 -Wall -W -Wextra -pedantic -c
36
37#
38# options flags
39#
40
41ifeq ($(DEBUG),yes)
42CFLAGS += -g -ggdb
43endif
44
45ifeq ($(PROFILE),yes)
46CFLAGS += -pg
47endif
48
49ifeq ($(SHARED),yes)
50CFLAGS += -fPIC
51endif
52
53#
54# extra flags
55#
56
57CFLAGS += -pipe $(addprefix -I,$(CC_DIR))
58 
59ifeq ($(OSTYPE),Darwin)
60CFLAGS += -mmacosx-version-min=10.5
61endif
62
63#
64# diagnostics (gcc is the reference)
65#
66
67CFLAGS += -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations \
68          -Wchar-subscripts -Wconversion -Wno-conversion -Winline \
69          -Wpointer-arith -Wbad-function-cast -Wcast-align -Wcast-qual \
70          -Wstrict-prototypes
71
72#         -Wfloat-equal -Wformat-nonliteral -Wwrite-strings
73
74# end of makefile
Note: See TracBrowser for help on using the repository browser.