Using Purify with test harnesses, makefiles, and scripts

You can incorporate Purify into existing test harnesses, makefiles, and scripts. For example, in a makefile:

hello_world: hello_world.o
     cc –g –o hello_world hello_world.o

you can just add purify

hello_world: hello_world.o
     purify cc –g –o hello_world hello_world.o

or you can create a separate target for the instrumented executable:

hello_world: hello_world.o
     cc –g –o hello_world hello_world.o

hello_world.pure: hello_world.o
     purify cc –g –o hello_world.pure hello_world.o

See also the sample makefile hello_world.Makefile.simple, located in the <purifyhome>/example directory.

Use Purify command-line options and API functions to control error checking and reporting. For example: