Skip to content

Commit

Permalink
Rework port compiler support
Browse files Browse the repository at this point in the history
 * consolidate options
 * add support for building executables
  • Loading branch information
Tuncer Ayaz committed Feb 3, 2012
1 parent ba53809 commit 6898eff
Show file tree
Hide file tree
Showing 2 changed files with 206 additions and 87 deletions.
18 changes: 6 additions & 12 deletions rebar.config.sample
Expand Up @@ -35,22 +35,16 @@

%% == Port Compiler ==

%% List of filenames or wildcards to be compiled. May also contain a tuple
%% consisting of a regular expression to be applied against the system
%% architecture and a list of filenames or wildcards to include should the
%% expression pass. Default is `"c_src/*.c"'
{port_sources, ["c_src/*.c", {"R14", ["c_src/*.c"]}]}.

%% Port compilation environment variables. See rebar_port_compiler.erl for
%% more info. Default is `[]'
{port_envs, []}.

%% Custom name of the port driver .so file. Defaults to `<Application>_drv.so'.
{so_name, "driver.so"}.

%% so_specs - useful for building multiple *.so files
%% from one or more object files
{so_specs, [{"priv/so_name.so", ["c_src/object_file_name.o"]}]}.
%% port_specs
%% List of filenames or wildcards to be compiled. May also contain a tuple
%% consisting of a regular expression to be applied against the system
%% architecture as a filter.
{port_specs, [{"priv/so_name.so", ["c_src/*.c"]},
{"linux", "priv/hello_linux", ["c_src/hello_linux.c"]]}.

%% == LFE Compiler ==

Expand Down

0 comments on commit 6898eff

Please sign in to comment.