Subversion Repositories f9daq

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
326 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        = cpp
52
ExeSuf        = .exe
53
DllSuf        = dll
54
OutPutOpt     = -out:
55
 
56
 
57
## VS2012 (VC11): configure subsystem version
58
## See: https://blogs.msdn.com/b/vcblog/archive/2012/10/08/10357555.aspx
59
## (APPVER used in win32.mak to set subsystem version)
60
!if ([nmake /? 2>&1 | findstr /c:"Version 14\." > nul ] == 0)
61
APPVER        = 5.01
62
!endif
63
 
64
# Win32 system with Microsoft Visual C/C++
65
!include <win32.mak>
66
CC            = $(cc)
67
CXX           = $(cc)
68
CXXFLAGS      = -nologo -EHsc -GR -DWIN32 -W3 -D_WINDOWS -DMAIN \
69
                -DVISUAL_CPLUSPLUS -I$(ROOTSYS)/include -Icvi -Iinclude \
70
                -wd4244
71
#-FIw32pragma.h
72
LD            = $(link)
73
 
74
!if "$(CFG)" == "Win32 Release"
75
CXXOPT        = -O2 -arch:SSE2 -MD
76
LDOPT         = -opt:ref
77
!elseif "$(CFG)" == "Win32 Debug"
78
!if "$(RUNTIME)" == "Debug"
79
CXXOPT        = -Z7 -MDd
80
!else
81
CXXOPT        = -Z7 -O2 -arch:SSE2 -MD
82
!endif
83
LDOPT         = -debug
84
!endif
85
 
86
# Check if nmake version is 8.xx or 9.xx
87
!if ([nmake /? 2>&1 | findstr /c:"Version 8\." > nul ] == 0) || \
88
    ([nmake /? 2>&1 | findstr /c:"Version 9\." > nul ] == 0)
89
MT_EXE        = mt -nologo -manifest $@.manifest -outputresource:$@;1
90
MT_DLL        = mt -nologo -manifest $@.manifest -outputresource:$@;2
91
EXTRAFLAGS    = -D_CRT_SECURE_NO_DEPRECATE
92
!else if ([nmake /? 2>&1 | findstr /c:"Version 12\." > nul ] == 0)
93
MT_EXE        =
94
MT_DLL        =
95
EXTRAFLAGS    =
96
!else if ([nmake /? 2>&1 | findstr /c:"Version 10\." > nul ] == 0)
97
EXTRAFLAGS    = -D_CRT_SECURE_NO_DEPRECATE
98
!else if ([nmake /? 2>&1 | findstr /c:"Version 14\." > nul ] == 0)
99
EXTRAFLAGS    = -D_CRT_SECURE_NO_DEPRECATE
100
!else
101
MT_EXE        =
102
MT_DLL        =
103
EXTRAFLAGS    = -G5
104
!endif
105
 
106
LDFLAGS       = $(LDOPT) $(conlflags) -nologo -include:_G__cpp_setupG__Hist \
107
                -include:_G__cpp_setupG__Graf -include:_G__cpp_setupG__G3D \
108
                -include:_G__cpp_setupG__GPad -include:_G__cpp_setupG__Tree \
109
                -include:_G__cpp_setupG__Rint -include:_G__cpp_setupG__PostScript \
110
                -include:_G__cpp_setupG__Matrix -include:_G__cpp_setupG__Physics
111
SOFLAGS       = $(dlllflags:-pdb:none=)
112
ROOTLIBS      = $(ROOTSYS)\lib\libCore.lib \
113
                $(ROOTSYS)\lib\libCint.lib $(ROOTSYS)\lib\libHist.lib \
114
                $(ROOTSYS)\lib\libGraf.lib $(ROOTSYS)\lib\libGraf3d.lib \
115
                $(ROOTSYS)\lib\libGpad.lib $(ROOTSYS)\lib\libTree.lib \
116
                $(ROOTSYS)\lib\libRint.lib $(ROOTSYS)\lib\libPostscript.lib \
117
                $(ROOTSYS)\lib\libMatrix.lib $(ROOTSYS)\lib\libPhysics.lib \
118
                $(ROOTSYS)\lib\libNet.lib $(ROOTSYS)\lib\libRIO.lib \
119
                $(ROOTSYS)\lib\libMathCore.lib
120
LIBS          = $(ROOTLIBS)
121
GLIBS         = $(LIBS) $(ROOTSYS)\lib\libGui.lib $(ROOTSYS)\lib\libGraf.lib \
122
                $(ROOTSYS)\lib\libGpad.lib
123
LIBSALL       = $(ROOTLIBS)
124
 
125
EVENTLIB      = libEvent.lib
126
 
127
 
128
#------------------------------------------------------------------------------
129
MYAPP    = sa02read$(ExeSuf)
130
MYAPPS   = sa02read.$(SrcSuf) XGetopt.$(ObjSuf) getopt_long.$(ObjSuf)
131
MYAPPO   = sa02read.$(ObjSuf) XGetopt.$(ObjSuf) getopt_long.$(ObjSuf)
132
 
133
 
134
 
135
OBJS          = $(MYAPPO)
136
PROGRAMS      = $(MYAPP)
137
 
138
#------------------------------------------------------------------------------
139
 
140
!message LDFLAGS = "$(LDFLAGS)"
141
!message MYAPP = "$(MYAPP)"
142
!message MYAPPO = "$(MYAPPO)"
143
!message PROGRAMS = "$(PROGRAMS)"
144
 
145
 
146
all:            $(PROGRAMS)
147
 
148
 
149
 
150
$(MYAPP):  $(MYAPPO)
151
        @echo "Compiling $@ "
152
		$(LD) $(LDFLAGS) /SUBSYSTEM:CONSOLE  \
153
		$(MYAPPO) $(LIBSALL) $(OutPutOpt)$@
154
		@echo "$@ done"
155
 
156
RootShowerDict.$(SrcSuf): MyParticle.h MyDetector.h MyEvent.h RSLinkDef.h
157
		@echo "Generating dictionary $@..."
158
		@rootcint -f $@ -c MyParticle.h MyDetector.h MyEvent.h RSLinkDef.h
159
 
160
#------------------------------------------------------------------------------
161
 
162
clean:
163
       @del *.obj *Dict.* *.def *.exp *.d *.log .def *.pdb *.ilk *.manifest
164
 
165
distclean: clean
166
       @del *.exe *.root *.ps *.lib *.dll
167
 
168
 
169
sa02read.$(ObjSuf): sa02read.$(SrcSuf)
170
        @echo "Compiling sa02read $@ "
171
        $(CXX) $(CXXFLAGS) $(EXTRAFLAGS) $(CXXOPT) -c sa02read.$(SrcSuf)
172
 
173
###
174
 
175
.$(SrcSuf).$(ObjSuf):
176
        @echo "Compiling object $@ "
177
        $(CXX) $(CXXFLAGS) $(EXTRAFLAGS) $(CXXOPT) -c $<
178
 
179
.c.$(ObjSuf):
180
        @echo "Compiling object $@ "
181
        $(CXX) $(CXXFLAGS) $(EXTRAFLAGS) $(CXXOPT) -c $<
182