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 | |
---|
23 | CDEP = $(CC) -MM $(addprefix -I,$(CC_DIR)) |
---|
24 | |
---|
25 | # |
---|
26 | # preprocessor flags |
---|
27 | # |
---|
28 | |
---|
29 | CPPFLAGS += -D_GCC |
---|
30 | |
---|
31 | # |
---|
32 | # compiler flags |
---|
33 | # |
---|
34 | |
---|
35 | CFLAGS = -m$(ARCH) -O$(NOPT) -std=c99 -Wall -W -Wextra -pedantic -c |
---|
36 | |
---|
37 | # |
---|
38 | # options flags |
---|
39 | # |
---|
40 | |
---|
41 | ifeq ($(DEBUG),yes) |
---|
42 | CFLAGS += -g -ggdb |
---|
43 | endif |
---|
44 | |
---|
45 | ifeq ($(PROFILE),yes) |
---|
46 | CFLAGS += -pg |
---|
47 | endif |
---|
48 | |
---|
49 | ifeq ($(SHARED),yes) |
---|
50 | CFLAGS += -fPIC |
---|
51 | endif |
---|
52 | |
---|
53 | # |
---|
54 | # extra flags |
---|
55 | # |
---|
56 | |
---|
57 | CFLAGS += -pipe $(addprefix -I,$(CC_DIR)) |
---|
58 | |
---|
59 | ifeq ($(OSTYPE),Darwin) |
---|
60 | CFLAGS += -mmacosx-version-min=10.5 |
---|
61 | endif |
---|
62 | |
---|
63 | # |
---|
64 | # diagnostics (gcc is the reference) |
---|
65 | # |
---|
66 | |
---|
67 | CFLAGS += -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.