# Created by: Francois Duchesneau # Date: 2011-07-03 # Description: For compiling Mark Story's clusterThis tool # Usage: Copy that Makefile into the directory where the VRAY_clusterThis.C is. # Open a Houdini command line shell and cd to that same directory and type the following nmake.exe command # "c:\Program Files (x86)\Microsoft Visual Studio 8\VC\bin\amd64\nmake.exe" # Make sure you've set the MSVCDir environment variable like this or in your Windows environment variables window # set MSVCDir=c:/progra~2/micros~2/vc # If you need to compile for an other version of Houdini, change the following three tags accordingly MAJORRELEASE = -DHOUDINI_MAJOR_RELEASE=11 MINORRELEASE = -DHOUDINI_MINOR_RELEASE=0 BUILDVERSION = -DHOUDINI_BUILD_VERSION=581 DSONAME = VRAY_clusterThis.dll SOURCES = VRAY_clusterThis.C !IFNDEF OPTIMIZER OPTIMIZER = -Ox !ENDIF !IFDEF MSVCDIR MSVCDir = $(MSVCDIR) !ENDIF AMD64 = 0 !IF "$(PROCESSOR_ARCHITECTURE)" == "AMD64" AMD64 = 1 !ENDIF !IF "$(PROCESSOR_ARCHITEW6432)" == "AMD64" AMD64 = 1 !ENDIF !IF $(AMD64) == 1 AMD64_SUFFIX = /amd64 !ENDIF CC = $(MSVCDir)/bin$(AMD64_SUFFIX)/cl -TP -MD -EHsc -GR -Zc:forScope -c LINK = $(MSVCDir)/bin$(AMD64_SUFFIX)/link HDEFINES = -DVERSION="11.0.581" -DI386 -DWIN32 -DSWAP_BITFIELDS -DDLLEXPORT="__declspec(dllexport)" -D_WIN32_WINNT=0x0501 -DWINVER=0x0501 -DSESI_LITTLE_ENDIAN HLIBINC = -LIBPATH:$(HFS)/custom/houdini/dsolib HLIBS = $(HFS)/custom/houdini/dsolib/*.a SYSLIBINC = -LIBPATH:$(MSVCDir)/lib$(AMD64_SUFFIX) -LIBPATH:$(MSVCDir)/PlatformSDK/lib$(AMD64_SUFFIX) SYSLIBS = INCINC = $(INCDIRS) -I$(HFS)/toolkit/include -I$(MSVCDir)/include -I$(MSVCDir)/PlatformSDK/include SHAREDFLAG = -DLL OBJOUTPUT = -Fo DSOOUTPUT = -out: SAOUTPUT = -out: OBJFLAGS = $(HDEFINES) $(INCINC) $(WFLAGS) $(OPTIMIZER) $(MAJORRELEASE) $(MINORRELEASE) $(BUILDVERSION) DSOFLAGS = $(SYSLIBINC) $(LIBDIRS) $(LIBS) $(SYSLIBS) $(HLIBINC) $(HLIBS) SAFLAGS = $(DSOFLAGS) HVERSION = 11.0 !IFNDEF INSTDIR INSTDIR = $(HOME)\houdini$(HVERSION) !ENDIF OBJECTS = $(SOURCES:.C=.o) CC = $(CC:/=\) LINK = $(LINK:/=\) !IFDEF DSONAME .C.o: echo Compiled on: > taginfo date /T >> taginfo time /T >> taginfo echo by: %USERNAME%@%COMPUTERNAME% >> taginfo !IFDEF SESI_TAGINFO echo $(SESI_TAGINFO) >> taginfo !ENDIF sesitag -c -f taginfo > tagdefines $(CC) $(OBJFLAGS) -DMAKING_DSO @tagdefines $< $(OBJOUTPUT)$@ del taginfo tagdefines $(DSONAME): $(OBJECTS) $(LINK) $(SHAREDFLAG) $(OBJECTS) $(DSOFLAGS) $(DSOOUTPUT)$@ !ENDIF !IFDEF APPNAME .C.o: $(CC) $(OBJFLAGS) $< $(OBJOUTPUT)$@ $(APPNAME): $(OBJECTS) $(LINK) $(OBJECTS) $(SAFLAGS) $(SAOUTPUT)$@ !ENDIF all: $(DSONAME) $(APPNAME) !IFDEF ICONS icons: $(ICONS) if not exist $(INSTDIR)\config\Icons mkdir $(INSTDIR)\config\Icons copy /Y $(ICONS) $(INSTDIR)\config\Icons !ELSE icons: !ENDIF !IFDEF DSONAME install: all icons if not exist $(INSTDIR)\dso mkdir $(INSTDIR)\dso copy /Y $(DSONAME) $(INSTDIR)\dso !ELSE install: all icons !ENDIF clean: del /F /Q $(OBJECTS) $(APPNAME) $(DSONAME)