!IF "$(CFG)" == ""
CFG = Debug
!MESSAGE No configuration specified. Defaulting to Win32 Debug.
!ENDIF
!IF "$(CFG)" != "Release" && "$(CFG)" != "Debug"
!MESSAGE Invalid configuration "$(CFG)" specified.
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "Makefile.win32" CFG="Debug"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "Release" (based on "Win32 (x86) Library")
!MESSAGE "Debug" (based on "Win32 (x86) Library")
!MESSAGE
!ERROR An invalid configuration is specified.
!ENDIF
ObjSuf = obj
SrcSuf = cxx
ExeSuf = .exe
DllSuf = dll
OutPutOpt = -out:
# Win32 system with Microsoft Visual C/C++
!include <win32.mak>
CC = $(cc)
CXX = $(cc)
CXXFLAGS = $(cvarsdll) -EHsc -nologo -GR -DWIN32 \
-D_WINDOWS -I$(ROOTSYS)/include \
-FIw32pragma.h
LD = $(link)
!IF "$(CFG)" == "Release"
CXXOPT = -O2 -MD
LDOPT = -opt:ref
!ELSEIF "$(CFG)" == "Debug"
CXXOPT = -Z7 -MDd
LDOPT = -debug
!ENDIF
# Check if nmake version is 8.xx or 9.xx
!if ([nmake /? 2>&1 | findstr /c:"Version 8\." > nul ] == 0) || \
([nmake /? 2>&1 | findstr /c:"Version 9\." > nul ] == 0)
MT_EXE = mt -nologo -manifest $@.manifest -outputresource:$@;1
MT_DLL = mt -nologo -manifest $@.manifest -outputresource:$@;2
EXTRAFLAGS = -D_CRT_SECURE_NO_DEPRECATE
!else
MT_EXE =
MT_DLL =
EXTRAFLAGS = -G5
!endif
LDFLAGS = $(LDOPT) $(conlflags) -nologo -include:_G__cpp_setupG__Hist \
-include:_G__cpp_setupG__Graf -include:_G__cpp_setupG__G3D \
-include:_G__cpp_setupG__GPad -include:_G__cpp_setupG__Tree \
-include:_G__cpp_setupG__Rint -include:_G__cpp_setupG__PostScript \
-include:_G__cpp_setupG__Matrix -include:_G__cpp_setupG__Physics
SOFLAGS = $(dlllflags:-pdb:none=)
ROOTLIBS = $(ROOTSYS)\lib\libCore.lib \
$(ROOTSYS)\lib\libCint.lib $(ROOTSYS)\lib\libHist.lib \
$(ROOTSYS)\lib\libGraf.lib $(ROOTSYS)\lib\libGraf3d.lib \
$(ROOTSYS)\lib\libGpad.lib $(ROOTSYS)\lib\libTree.lib \
$(ROOTSYS)\lib\libRint.lib $(ROOTSYS)\lib\libPostscript.lib \
$(ROOTSYS)\lib\libMatrix.lib $(ROOTSYS)\lib\libPhysics.lib \
$(ROOTSYS)\lib\libNet.lib $(ROOTSYS)\lib\libRIO.lib \
$(ROOTSYS)\lib\libMathCore.lib
LIBS = $(ROOTLIBS)
GLIBS = $(LIBS) $(ROOTSYS)\lib\libGui.lib $(ROOTSYS)\lib\libGraf.lib \
$(ROOTSYS)\lib\libGpad.lib
LIBSALL = $(ROOTLIBS)
EVENTLIB = libEvent.lib
#------------------------------------------------------------------------------
RIDES = main.$(SrcSuf) TGRootIDE.$(SrcSuf) RIDEDict.$(SrcSuf)
RIDEO = main.$(ObjSuf) TGRootIDE.$(ObjSuf) RIDEDict.$(ObjSuf)
RIDE = RIDE$(ExeSuf)
OBJS = $(RIDEO)
PROGRAMS = $(RIDE)
#------------------------------------------------------------------------------
all: $(PROGRAMS)
$(RIDE): $(RIDEO)
$(LD) $(LDFLAGS) /SUBSYSTEM:WINDOWS /ENTRY:mainCRTStartup \
$(RIDEO) $(GLIBS) $(ROOTSYS)\lib\libGuiHtml.lib \
$(ROOTSYS)\lib\libHtml.lib $(OutPutOpt)$@
$(MT_EXE)
@echo "$@ done"
RIDEDict.$(SrcSuf): TGRootIDE.h LinkDef.h
@echo "Generating dictionary $@..."
@rootcint -f $@ -c TGRootIDE.h LinkDef.h
#------------------------------------------------------------------------------
clean:
@del *.obj *Dict.* *.def *.exp *.d *.log .def *.pdb *.ilk *.manifest
distclean: clean
@del *.exe *.root *.ps *.lib *.dll
###
.$(SrcSuf).$(ObjSuf):
$(CXX) $(CXXFLAGS) $(EXTRAFLAGS) $(CXXOPT) -c $<