Permalink
Browse files

Add possibility to compile epcap with PF_RING

  • Loading branch information...
1 parent 1975bc0 commit 0b8a5af19b866b9949bfc9bfcc1c63410f61afdc @ates committed Oct 2, 2012
Showing with 17 additions and 0 deletions.
  1. +17 −0 rebar.config.script
View
@@ -0,0 +1,17 @@
+case os:getenv("PFRING") of
+ false ->
+ CONFIG;
+ Value ->
+ case filelib:is_dir(Value) of
+ true ->
+ case lists:keysearch(port_env, 1, CONFIG) of
+ {value, {port_env, Flags}} ->
+ {"EXE_LDFLAGS", LDFLAGS} = hd(Flags),
+ NewFlags = LDFLAGS ++ " -static -L " ++ Value ++ " -lpfring -lpthread",
+ NewLDFLAGS = lists:keyreplace("EXE_LDFLAGS", 1, Flags, {"EXE_LDFLAGS", NewFlags}),
+ lists:keyreplace(port_env, 1, CONFIG, {port_env, NewLDFLAGS});
+ _ -> CONFIG
+ end;
+ _ -> CONFIG
+ end
+end.

0 comments on commit 0b8a5af

Please sign in to comment.