Anonymous avatar Anonymous committed 4c0e2b7

make makfile work for macosx building

Comments (0)

Files changed (5)

-\.o$
-.dylib$
+^src/.+\.o$
+^ebin/
+^lib/
+# -*- mode: makefile -*-
 # Makefile definitions for v8erl
 
 #Build environment info
 LDFLAGS = -Wall -fPIC -dynamiclib -flat_namespace -undefined suppress
 else
 LIB_EXT = so
-LDFLAGS = -Wall -fPIC -shared -flat_namespace -undefined
+LDFLAGS = -Wall -fPIC -shared -flat_namespace -undefined suppress
 endif
 
 #Is ERL_ROOT defined?  If not we have to guess....

Makefile.in

-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-
-ifeq ($(shell uname),Linux)
-ARCH = linux
-LIBEXT = so
-else
-ARCH = macosx
-LIBEXT = dylib
-endif
-
-all:
-	(cd src;$(MAKE))
-
-clean:
-	(cd src;$(MAKE) clean)
-

configure.in

-# -*- Autoconf -*-
-# Process this file with autoconf to produce a configure script.
- 
-AC_PREREQ(2.60)
-AC_INIT(v8erl, 0.1)
- 
-# Checks for programs.
-AC_PROG_CXX
-#AC_PATH_PROG(ERL, erl)
-#AC_PATH_PROG(ERLC, erlc)
- 
-ERLDIR=`awk -F= '/ROOTDIR=/ { print [$]2; exit; }' $ERL`
-AC_SUBST(ERL)
-AC_SUBST(ERLC)
-AC_SUBST(ERLBINDIR)
-AC_SUBST(ERLDIR)
- 
-ERL_INTERFACE=`ls ${ERLDIR}/lib | grep erl_interface | tail -n 1`
- 
-ERTSBASE="`$ERL -noshell -noinput -eval 'io:format (\"~s\", [[ \"/\" ++ filename:join (lists:reverse ([ \"erts-\" ++ erlang:system_info (version) | tl (lists:reverse (string:tokens (code:lib_dir (), \"/\"))) ])) ]]).' -s erlang halt `"
-AC_SUBST(ERTSBASE)
- 
-CPPFLAGS="$CPPFLAGS -I ${ERTSBASE}/include -I ${ERLDIR}/lib/${ERL_INTERFACE}/include -Wall -fPIC -Iinclude"
- 
-LIBEI="${ERLDIR}/lib/${ERL_INTERFACE}/lib/libei.a"
-AC_SUBST(LIBEI)
-# Checks for header files.
-AC_CHECK_HEADERS([])
- 
-# Checks for typedefs, structures, and compiler characteristics.
-AC_HEADER_STDBOOL
- 
-# Checks for library functions.
-AC_HEADER_STDC
- 
-AC_OUTPUT([src/Makefile Makefile])
 -module(v8).
--export([load/0]).
+-export([load/0,
+		 context/0,
+		 script/2]).
 -define(LIB, "v8erl").
 
 load() ->
     case whereis(v8erl) of
-	undefined ->
-	    case erl_ddll:load_driver(".", ?LIB) of
-		ok ->
-		    ok;
-		{error, already_loaded} -> ok;
-		E -> exit(E)
-	    end
-	_ ->
-	    ok
+		undefined ->
+			case erl_ddll:load_driver(".", ?LIB) of
+				ok ->
+					ok;
+				{error, already_loaded} ->
+					ok;
+				E -> 
+					exit(E)
+			end;
+		_ ->
+			ok
     end.
 
 
 
 
 script(Context, Script) when is_port(Context) andalso 
-			     is_binary(Script) ->
+							 is_binary(Script) ->
     port_control(Context, 1, Script).
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.