Rev 198 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
195 | f9daq | 1 | #cmd.exe /k ""C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat"" x86 |
2 | #set INCLUDE=%INCLUDE%;"C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Include" |
||
3 | #set ROOTSYS=C:\root_v5.34.34 |
||
4 | # |
||
5 | #nmake -f Makefile.win32 |
||
6 | # |
||
7 | #set INCLUDE=%INCLUDE%;C:\Program Files\Microsoft SDKs\Windows\v7.1A\Include |
||
8 | !if "$(CFG)" == "" |
||
9 | !if ([findstr /c:"--build=debug" $(ROOTSYS)\bin\root-config > nul ] == 0) |
||
10 | CFG = Win32 Debug |
||
11 | !if ([findstr /c:"--disable-winrtdebug" $(ROOTSYS)\bin\root-config > nul ] == 0) |
||
12 | RUNTIME = Release |
||
13 | !else |
||
14 | RUNTIME = Debug |
||
15 | !endif |
||
16 | !message No configuration specified: Defaulting to Win32 Debug |
||
17 | !message With $(RUNTIME) Runtime DLL (Taken from ROOT config). |
||
18 | !message . |
||
19 | !else |
||
20 | CFG = Win32 Release |
||
21 | RUNTIME = Release |
||
22 | !message No configuration specified: Defaulting to Win32 Release |
||
23 | !message With $(RUNTIME) Runtime DLL (Taken from ROOT config). |
||
24 | !message . |
||
25 | !endif |
||
26 | !else |
||
27 | !if "$(CFG)" == "Win32 Release" |
||
28 | RUNTIME = Release |
||
29 | !elseif "$(CFG)" == "Win32 Debug" |
||
30 | RUNTIME = Debug |
||
31 | !endif |
||
32 | !endif |
||
33 | |||
34 | !if "$(CFG)" != "Win32 Release" && "$(CFG)" != "Win32 Debug" |
||
35 | !message Invalid configuration "$(CFG)" specified. |
||
36 | !message You can specify a configuration when running NMAKE |
||
37 | !message by defining the macro CFG on the command line. For example: |
||
38 | !message |
||
39 | !message NMAKE /f "Makefile.msc" CFG="Win32 Debug" |
||
40 | !message |
||
41 | !message Possible choices for configuration are: |
||
42 | !message |
||
43 | !message "Win32 Release" (based on "Win32 (x86) Dynamic Library") |
||
44 | !message "Win32 Debug" (based on "Win32 (x86) Dynamic Library") |
||
45 | !message |
||
46 | !error An invalid configuration is specified. |
||
47 | !endif |
||
48 | !message ROOTSYS = "$(ROOTSYS)/include" |
||
49 | |||
50 | ObjSuf = obj |
||
51 | SrcSuf = c |
||
52 | SrcSuf1 = cpp |
||
53 | ExeSuf = .exe |
||
54 | DllSuf = dll |
||
55 | OutPutOpt = -out: |
||
56 | |||
57 | |||
58 | ## VS2012 (VC11): configure subsystem version |
||
59 | ## See: https://blogs.msdn.com/b/vcblog/archive/2012/10/08/10357555.aspx |
||
60 | ## (APPVER used in win32.mak to set subsystem version) |
||
61 | !if ([nmake /? 2>&1 | findstr /c:"Version 14\." > nul ] == 0) |
||
62 | APPVER = 5.01 |
||
63 | !endif |
||
64 | |||
65 | # Win32 system with Microsoft Visual C/C++ |
||
66 | !include <win32.mak> |
||
67 | CC = $(cc) |
||
68 | CXX = $(cc) |
||
69 | CXXFLAGS = -nologo -EHsc -GR -DWIN32 -W3 -D_WINDOWS -DMAIN -DDLLMAIN -DHAVE_USB -DHAVE_LIBUSB10 -D_XKEYCHECK_H -DMYDLL_API\ |
||
70 | -DVISUAL_CPLUSPLUS -I$(ROOTSYS)/include -Icvi -I. \ |
||
71 | -wd4244 |
||
72 | #-FIw32pragma.h |
||
73 | LD = $(link) |
||
74 | |||
75 | !if "$(CFG)" == "Win32 Release" |
||
76 | CXXOPT = -O2 -arch:SSE2 -MD |
||
77 | LDOPT = -opt:ref |
||
78 | !elseif "$(CFG)" == "Win32 Debug" |
||
79 | !if "$(RUNTIME)" == "Debug" |
||
80 | CXXOPT = -Z7 -MDd |
||
81 | !else |
||
82 | CXXOPT = -Z7 -O2 -arch:SSE2 -MD |
||
83 | !endif |
||
84 | LDOPT = -debug |
||
85 | !endif |
||
86 | |||
87 | # Check if nmake version is 8.xx or 9.xx |
||
88 | !if ([nmake /? 2>&1 | findstr /c:"Version 8\." > nul ] == 0) || \ |
||
89 | ([nmake /? 2>&1 | findstr /c:"Version 9\." > nul ] == 0) |
||
90 | MT_EXE = mt -nologo -manifest $@.manifest -outputresource:$@;1 |
||
91 | MT_DLL = mt -nologo -manifest $@.manifest -outputresource:$@;2 |
||
92 | EXTRAFLAGS = -D_CRT_SECURE_NO_DEPRECATE |
||
93 | !else if ([nmake /? 2>&1 | findstr /c:"Version 12\." > nul ] == 0) |
||
94 | MT_EXE = |
||
95 | MT_DLL = |
||
96 | EXTRAFLAGS = |
||
97 | !else if ([nmake /? 2>&1 | findstr /c:"Version 10\." > nul ] == 0) |
||
98 | EXTRAFLAGS = -D_CRT_SECURE_NO_DEPRECATE |
||
99 | !else if ([nmake /? 2>&1 | findstr /c:"Version 14\." > nul ] == 0) |
||
100 | EXTRAFLAGS = -D_CRT_SECURE_NO_DEPRECATE |
||
101 | !else |
||
102 | MT_EXE = |
||
103 | MT_DLL = |
||
104 | EXTRAFLAGS = -G5 |
||
105 | !endif |
||
106 | |||
107 | LDFLAGS1 = $(LDOPT) $(conlflags) -nologo -include:_G__cpp_setupG__Hist \ |
||
108 | -include:_G__cpp_setupG__Graf -include:_G__cpp_setupG__G3D \ |
||
109 | -include:_G__cpp_setupG__GPad -include:_G__cpp_setupG__Tree \ |
||
110 | -include:_G__cpp_setupG__Rint -include:_G__cpp_setupG__PostScript \ |
||
111 | -include:_G__cpp_setupG__Matrix -include:_G__cpp_setupG__Physics |
||
112 | |||
113 | LDFLAGS1 = $(LDOPT) $(conlflags) -nologo |
||
114 | |||
115 | SOFLAGS = $(dlllflags:-pdb:none=) |
||
116 | ROOTLIBS = $(ROOTSYS)\lib\libCore.lib \ |
||
117 | $(ROOTSYS)\lib\libCint.lib $(ROOTSYS)\lib\libHist.lib \ |
||
118 | $(ROOTSYS)\lib\libGraf.lib $(ROOTSYS)\lib\libGraf3d.lib \ |
||
119 | $(ROOTSYS)\lib\libGpad.lib $(ROOTSYS)\lib\libTree.lib \ |
||
120 | $(ROOTSYS)\lib\libRint.lib $(ROOTSYS)\lib\libPostscript.lib \ |
||
121 | $(ROOTSYS)\lib\libMatrix.lib $(ROOTSYS)\lib\libPhysics.lib \ |
||
122 | $(ROOTSYS)\lib\libNet.lib $(ROOTSYS)\lib\libRIO.lib \ |
||
123 | $(ROOTSYS)\lib\libMathCore.lib |
||
124 | LIBS = libusb-1.0.lib |
||
125 | GLIBS = $(LIBS) $(ROOTSYS)\lib\libGui.lib $(ROOTSYS)\lib\libGraf.lib \ |
||
126 | $(ROOTSYS)\lib\libGpad.lib |
||
127 | LIBSALL = libusb-1.0.lib |
||
128 | |||
129 | |||
130 | |||
131 | |||
132 | #------------------------------------------------------------------------------ |
||
133 | MYAPP = drscl$(ExeSuf) |
||
134 | MYAPPS = drscl.$(SrcSuf1) musbstd.$(SrcSuf) mxml.$(SrcSuf) strlcpy.$(SrcSuf) DRS.$(SrcSuf1) averager.$(SrcSuf1) |
||
135 | |||
136 | MYAPPO = drscl.$(ObjSuf) musbstd.$(ObjSuf) mxml.$(ObjSuf) strlcpy.$(ObjSuf) DRS.$(ObjSuf) averager.$(ObjSuf) |
||
137 | |||
138 | MYREADO = musbstd.$(ObjSuf) mxml.$(ObjSuf) DRS.$(ObjSuf) averager.$(ObjSuf) drsread.$(ObjSuf) XGetopt.$(ObjSuf) getopt_long.$(ObjSuf) timer.$(ObjSuf) gettimeofday.$(ObjSuf) |
||
139 | |||
140 | OBJS = $(MYAPPO) |
||
141 | PROGRAMS = $(MYAPP) |
||
142 | |||
143 | #------------------------------------------------------------------------------ |
||
144 | |||
145 | !message LDFLAGS = "$(LDFLAGS)" |
||
146 | !message MYAPP = "$(MYAPP)" |
||
147 | !message MYAPPO = "$(MYAPPO)" |
||
148 | !message PROGRAMS = "$(PROGRAMS)" |
||
149 | |||
150 | |||
151 | all: $(PROGRAMS) drsread.exe drsread.dll |
||
152 | |||
153 | |||
154 | |||
155 | RootShowerDict.$(SrcSuf): MyParticle.h MyDetector.h MyEvent.h RSLinkDef.h |
||
156 | @echo "Generating dictionary $@..." |
||
157 | @rootcint -f $@ -c MyParticle.h MyDetector.h MyEvent.h RSLinkDef.h |
||
158 | |||
159 | #------------------------------------------------------------------------------ |
||
160 | |||
161 | clean: |
||
162 | @del *.obj *Dict.* *.def *.exp *.d *.log .def *.pdb *.ilk *.manifest |
||
163 | |||
164 | distclean: clean |
||
165 | @del *.exe *.root *.ps *.lib *.dll |
||
166 | |||
167 | $(MYAPP): $(MYAPPO) |
||
168 | @echo "Compiling $@ " |
||
169 | $(LD) $(LDFLAGS) /SUBSYSTEM:CONSOLE \ |
||
170 | $(MYAPPO) $(LIBSALL) $(OutPutOpt)$@ |
||
171 | @echo "$@ done" |
||
172 | |||
173 | drscl.$(ObjSuf): drscl.$(SrcSuf1) |
||
174 | @echo "Compiling drs $@ " |
||
175 | $(CXX) $(CXXFLAGS) $(EXTRAFLAGS) $(CXXOPT) -c drscl.$(SrcSuf1) |
||
176 | |||
177 | drsread.exe: $(MYREADO) |
||
178 | @echo "Compiling $@ " |
||
179 | $(LD) $(LDFLAGS) /SUBSYSTEM:CONSOLE \ |
||
180 | $(MYREADO) $(LIBSALL) $(ROOTLIBS) $(OutPutOpt)$@ |
||
181 | @echo "$@ done" |
||
182 | |||
183 | drsread.dll: $(MYREADO) |
||
184 | @echo "DLL library $@ " |
||
185 | $(LD) /DLL $(MYREADO) $(LIBSALL) $(ROOTLIBS) /OUT:drsread.dll |
||
186 | @echo "$@ done" |
||
187 | |||
188 | |||
189 | drsreadDict.cpp: drsread.h LinkDef.h |
||
190 | rootcint -f drsreadDict.cpp -c drsread.h LinkDef.h |
||
191 | |||
192 | |||
193 | drsread.$(ObjSuf): drsread.$(SrcSuf1) |
||
194 | @echo "Compiling drsread $@ " |
||
195 | $(CXX) $(CXXFLAGS) $(EXTRAFLAGS) $(CXXOPT) -c drsread.$(SrcSuf1) |
||
196 | |||
197 | |||
198 | .$(SrcSuf1).$(ObjSuf): |
||
199 | @echo "Compiling object $@ " |
||
200 | $(CXX) $(CXXFLAGS) $(EXTRAFLAGS) $(CXXOPT) -c $< |
||
201 | |||
202 | .c.$(ObjSuf): |
||
203 | @echo "Compiling object $@ " |
||
204 | $(CXX) $(CXXFLAGS) $(EXTRAFLAGS) $(CXXOPT) -c $< |
||
205 |