anchor.diff:  %% Supported configuration variables:
   %%
   %% * port_sources - Erlang list of files and/or wildcard strings to be compiled
  +%%
  +%% * so_specs  - Erlang list of tuples of the form {"priv/so_name.so", ["c_src/object_file_name.o"]} useful for
  +%%               building multiple *.so files.
   %%
   %% * port_envs - Erlang list of key/value pairs which will control the environment when
   %%               running the compiler and linker. By default, the following variables
  
positive.code:     Ext = filename:extension(Source),
      filename:rootname(Source, Ext) ++ ".o".
  
  so_name(Config, AppFile) ->
      %% Check config to see if a custom so_name has been specified
      PortName = case rebar_config:get(Config, so_name, undefined) of
                     undefined ->
                         %% Get the app name, which we'll use to
                         %% generate the linked port driver name
                         case rebar_app_utils:load_app_file(AppFile) of
                             {ok, AppName, _} ->
                                 lists:concat([AppName, "_drv.so"]);
                             error ->
                                 ?FAIL
                         end;
                     Soname ->
                         Soname
                 end,
  
      %% Construct the driver name
      ?FMT("priv/~s", [PortName]).
  
negative.code:     rebar_file_utils:delete_each([source_to_bin(S) || S <- Sources]),
  
      %% Delete the .so file
      rebar_file_utils:delete_each(lists:map(fun({SoName,_}) -> SoName end, so_specs(Config, AppFile, expand_objects(Sources)))),
  
      %% Run the cleanup script, if it exists
      run_cleanup_hook(Config).
  