1 | # | |
---|
2 | # o---------------------------------------------------------------------o |
---|
3 | # | |
---|
4 | # | MAD makefile - cl compiler settings (Visual Studio C++) |
---|
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 | # CL specific |
---|
21 | # |
---|
22 | |
---|
23 | # |
---|
24 | # preprocessor flags |
---|
25 | # |
---|
26 | |
---|
27 | CPPFLAGS += -D_MCC |
---|
28 | |
---|
29 | # |
---|
30 | # command translator |
---|
31 | # |
---|
32 | |
---|
33 | CL_CC1 := -D% -I% /O3 /O0 |
---|
34 | CL_CC2 := /D% /I% /O2 /Od |
---|
35 | |
---|
36 | ############### |
---|
37 | # C language |
---|
38 | # |
---|
39 | |
---|
40 | ifeq ($(CCNAME),cl) |
---|
41 | |
---|
42 | # |
---|
43 | # makedep |
---|
44 | # |
---|
45 | |
---|
46 | ifneq ($(and $(SED),$(GREP)),) |
---|
47 | CDEP = $(CC) /nologo /c /Zs /showIncludes |
---|
48 | CDEP_tr = | $(GREP) -i -F "$(call f1bs,$(CURDIR))" \ |
---|
49 | | $(SED) -e "s/$(call f2bs,$(CURDIR)/)//gi" \ |
---|
50 | -e "s/Note: including file:/$<:/gi" \ |
---|
51 | -e "s/\.c:/\.o:/g" |
---|
52 | endif |
---|
53 | |
---|
54 | # |
---|
55 | # compiler flags |
---|
56 | # |
---|
57 | |
---|
58 | CFLAGS = /O$(NOPT) /c # /Wall |
---|
59 | |
---|
60 | # |
---|
61 | # options flags |
---|
62 | # |
---|
63 | |
---|
64 | ifeq ($(DEBUG),yes) |
---|
65 | CFLAGS += /Zi /Yd |
---|
66 | endif |
---|
67 | |
---|
68 | ifeq ($(PROFILE),yes) |
---|
69 | CFLAGS += |
---|
70 | endif |
---|
71 | |
---|
72 | # |
---|
73 | # extra flags |
---|
74 | # |
---|
75 | |
---|
76 | CFLAGS += /nologo /fp:precise /Zm1000 /EHsc /D_CRT_SECURE_NO_WARNINGS /Dinline=__inline |
---|
77 | |
---|
78 | # |
---|
79 | # command translator |
---|
80 | # |
---|
81 | |
---|
82 | CC_tr = $(strip $(subst $(SPACE)-o , /Fo,$(call trans,$(CL_CC1),$(CL_CC2),$1))) |
---|
83 | |
---|
84 | endif |
---|
85 | |
---|
86 | ############### |
---|
87 | # C++ language |
---|
88 | # |
---|
89 | |
---|
90 | ifeq ($(CXXNAME),cl) |
---|
91 | |
---|
92 | # |
---|
93 | # makedep |
---|
94 | # |
---|
95 | |
---|
96 | ifneq ($(and $(SED),$(GREP)),) |
---|
97 | CXXDEP = $(CC) /nologo /c /Zs /showIncludes |
---|
98 | CXXDEP_tr = | $(GREP) -i -F "$(call f1bs,$(CURDIR))" \ |
---|
99 | | $(SED) -e "s/$(call f2bs,$(CURDIR)/)//gi" \ |
---|
100 | -e "s/Note: including file:/$<:/gi" \ |
---|
101 | -e "s/\.c:/\.o:/g" |
---|
102 | endif |
---|
103 | |
---|
104 | # |
---|
105 | # compiler flags |
---|
106 | # |
---|
107 | |
---|
108 | CXXFLAGS = /O$(NOPT) /c # /Wall |
---|
109 | |
---|
110 | # |
---|
111 | # options flags |
---|
112 | # |
---|
113 | |
---|
114 | ifeq ($(DEBUG),yes) |
---|
115 | CXXFLAGS += /Zi /Yd |
---|
116 | endif |
---|
117 | |
---|
118 | ifeq ($(PROFILE),yes) |
---|
119 | CXXFLAGS += |
---|
120 | endif |
---|
121 | |
---|
122 | # |
---|
123 | # extra flags |
---|
124 | # |
---|
125 | |
---|
126 | CXXFLAGS += /nologo /fp:precise /Zm1000 /EHsc /D_CRT_SECURE_NO_WARNINGS /Dinline=__inline |
---|
127 | |
---|
128 | # |
---|
129 | # command translator |
---|
130 | # |
---|
131 | |
---|
132 | CXX_tr = $(strip $(subst $(SPACE)-o , /Fo,$(call trans,$(CL_CC1),$(CL_CC2),$1))) |
---|
133 | |
---|
134 | endif |
---|
135 | |
---|
136 | # end of makefile |
---|