all: verge3d.dle

verge3d_html.obj: verge3d_html.cpp
	cl /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DUNICODE -D_UNICODE -I"$(MAX_SDK_DIR)\include" /Foverge3d_html.obj /EHa -DNOMINMAX -D_USE_MATH_DEFINES $(EXTRA_CL_FLAGS) verge3d_html.cpp

verge3d_gltf.obj: verge3d_gltf.cpp
	cl /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DUNICODE -D_UNICODE -I"$(MAX_SDK_DIR)\include" /Foverge3d_gltf.obj /EHa -DNOMINMAX -D_USE_MATH_DEFINES $(EXTRA_CL_FLAGS) verge3d_gltf.cpp

dllentry.obj: dllentry.cpp
	cl /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DUNICODE -D_UNICODE -I"$(MAX_SDK_DIR)\include" /Fodllentry.obj /EHa -DNOMINMAX -D_USE_MATH_DEFINES $(EXTRA_CL_FLAGS) dllentry.cpp

verge3d.dle: verge3d_html.obj verge3d_gltf.obj dllentry.obj
	link /nologo /INCREMENTAL:NO /LTCG /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO /LIBPATH:"$(MAX_SDK_DIR)\lib\x64\Release" core.lib paramblk2.lib gfx.lib kernel32.lib gdi32.lib user32.lib mesh.lib maxutil.lib igame.lib geom.lib maxscrpt.lib dllentry.obj verge3d_html.obj verge3d_gltf.obj /NOIMPLIB /NOEXP /DEF:verge3d.def /OUT:verge3d.dle 

clean:
	del verge3d_html.obj
	del verge3d_gltf.obj
	del dllentry.obj
	del verge3d.dle
