Skip to content
Browse files

change source dirs, add makefile

  • Loading branch information...
1 parent cdff111 commit 226b43b4d5d186e678aa7021486984580e699bf5 @RJ RJ committed with Jun 15, 2009
View
20 Makefile
@@ -0,0 +1,20 @@
+INCLUDEDIR=src
+TARGETDIR=ebin
+SRCDIR=src
+
+INCLUDEFLAGS=$(patsubst %,-I%, ${INCLUDEDIR})
+
+MODULES = php_app php php_eval php_sup php_util
+INCLUDES =
+TARGETS = $(patsubst %,${TARGETDIR}/%.beam,${MODULES})
+HEADERS = $(patsubst %,${INCLUDEDIR}/%.hrl,${INCLUDES})
+
+all: ${TARGETS}
+
+$(TARGETS): ${TARGETDIR}/%.beam: ${SRCDIR}/%.erl ${HEADERS}
+ mkdir -p ebin
+ erlc ${INCLUDEFLAGS} -o ${TARGETDIR} $<
+ cp ${SRCDIR}/*.app $(TARGETDIR)
+
+clean:
+ rm -f ${TARGETDIR}/*.beam
View
1 run.sh
@@ -0,0 +1 @@
+erl -pa ebin/ -name phpapp@`hostname` -s php
View
8 php.app → src/php.app
@@ -3,16 +3,16 @@
{mod,
{php_app,
[
- %% php processes to use
- %% default: erlang:system_info(logical_processors)
- % {procs, 2},
+ %% number of php processes to use
+ %% default if procs not specified: erlang:system_info(logical_processors)
+ {procs, 3},
{opts,[
%% path to PHP CLI binary
%{php, "/usr/local/bin/php"},
%% working dir for PHP (docroot?)
%{dir, "/home/skeltoac/public_html"},
%% initial PHP commands (includes?)
- %{init, "require('wp-config.php');"},
+ %{init, "require('wcdb-include.php');"},
%% default maximum memory allowed (Kib or infinity)
{maxmem, 102400}
]}]
View
0 php.erl → src/php.erl
File renamed without changes.
View
0 php_app.erl → src/php_app.erl
File renamed without changes.
View
0 php_eval.erl → src/php_eval.erl
File renamed without changes.
View
0 php_sup.erl → src/php_sup.erl
File renamed without changes.
View
0 php_util.erl → src/php_util.erl
File renamed without changes.

0 comments on commit 226b43b

Please sign in to comment.
Something went wrong with that request. Please try again.