# Linux compilation Makefile for shaders described in the book # "Writing mental ray Shaders: A perceptual introduction" # Compilation is described in http://www.writingshaders.com/compilation.html. # Also see the subsection "Dynamic Linking of Shaders" in section "Using and # Writing Shaders" in the on-line mental ray documentation. CFLAGS = -ansi -pedantic -Wall -g -I/usr/include -I/usr/local/mi/rayinc %.so : %.c miaux.o gcc ${CFLAGS} -c -O3 -fPIC $*.c ld -export-dynamic -shared -o $*.so miaux.o $*.o %.so : %.cpp g++ ${CFLAGS} -c -O3 -fPIC $*.cpp ld -export-dynamic -shared -o $*.so miaux.o $*.o %.o : %.c gcc ${CFLAGS} -c -O3 -fPIC -fno-common $*.c %.o : %.cpp g++ ${CFLAGS} -c -O3 -fPIC -fno-common $*.cpp all : \ miaux.o \ matrix.o \ mrpoly.o \ newblocks.so \ add_colors.so \ ambient_occlusion.so \ ambient_occlusion_cutoff.so \ annotate.so \ average_radiance.so \ average_radiance_options.so \ blinn.so \ bump_ripple.so \ bump_texture.so \ bump_wave.so \ bump_wave_uv.so \ c_contour.so \ c_contrast.so \ c_output.so \ c_store.so \ c_tessellate.so \ c_toon.so \ channel_ramp.so \ chrome_ramp.so \ color_ramp.so \ cook_torrance.so \ default_lens.so \ density_volume.so \ depth_fade.so \ depth_fade_tint.so \ depth_fade_tint_2.so \ depth_fade_tint_3.so \ depth_of_field.so \ displace_ripple.so \ displace_texture.so \ displace_wave.so \ displace_wave_uv.so \ equirectangular.so \ fisheye.so \ fog.so \ framebuffer_put.so \ front_bright.so \ front_bright_dot.so \ front_bright_steps.so \ global_lambert.so \ glossy_reflection.so \ glossy_reflection_sample.so \ glossy_reflection_sample_varying.so \ glossy_refraction.so \ glossy_refraction_sample.so \ glossy_refraction_sample_varying.so \ ground_fog.so \ ground_fog_layers.so \ hair_color_bary.so \ hair_color_fire.so \ hair_color_light.so \ hair_color_texture.so \ hair_geo_2v.so \ hair_geo_4v.so \ hair_geo_4v_texture.so \ hair_geo_curl.so \ hair_geo_datafile.so \ hair_geo_row.so \ illuminated_volume.so \ instanced_object_file.so \ lambert.so \ lambert_steps.so \ letterbox.so \ median_filter.so \ mock_specular.so \ normals_as_colors.so \ object_file.so \ one_color.so \ op_mix_ccc.so \ op_pow_cs.so \ parameter_volume.so \ phong.so \ phong_framebuffer.so \ point_light.so \ point_light_falloff.so \ point_light_shadow.so \ radial_falloff.so \ rim_bright.so \ shadow_breakpoint.so \ shadow_breakpoint_scale.so \ shadow_color.so \ shadow_continuous.so \ shadow_default.so \ shadowpass.so \ show_barycentric.so \ show_uv.so \ show_uv_steps.so \ sinusoid_soft_spotlight.so \ soft_spotlight.so \ specular_reflection.so \ specular_refraction.so \ specular_refraction_simple.so \ spherical_density.so \ spotlight.so \ square.so \ store_diffuse_photon.so \ streak.so \ summed_noise_color.so \ summed_noise_scalar.so \ texture_uv.so \ texture_uv_simple.so \ threshold_volume.so \ transmit_specular_photon.so \ transparent.so \ transparent_modularized.so \ transparent_shadow.so \ triangles.so \ vertex_color.so \ voxel_density.so \ ward.so newblocks.so : newblocks.cpp matrix.o mrpoly.o g++ -I/usr/include -I/usr/local/mi/rayinc -c -O3 -fPIC newblocks.cpp ld -export-dynamic -shared -o newblocks.so matrix.o mrpoly.o newblocks.o