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