CMake (see cmake.org) is a cross platform makefile generator. It can generate not only makefiles for Unix of NMake but also a ton of different IDE (Visual Studio, Eclipse, Xcode ...). It comes with a bunch of package search modules, e.g. one to find OpenSSL.
The attached CMakeLists.txt allows CMake to generate a build environment for libdkim detecting OpenSSL whereever it is located on the system (or asking the user to specify it). Just drop it in the src directory.
CMake build instructions