Skip to content

Commit

Permalink
change source dirs, add makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
RJ authored and skeltoac committed Nov 10, 2009
1 parent cdff111 commit 226b43b
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 4 deletions.
20 changes: 20 additions & 0 deletions 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
1 change: 1 addition & 0 deletions run.sh
@@ -0,0 +1 @@
erl -pa ebin/ -name phpapp@`hostname` -s php
8 changes: 4 additions & 4 deletions php.app → src/php.app
Expand Up @@ -3,16 +3,16 @@
{mod, {mod,
{php_app, {php_app,
[ [
%% php processes to use %% number of php processes to use
%% default: erlang:system_info(logical_processors) %% default if procs not specified: erlang:system_info(logical_processors)
% {procs, 2}, {procs, 3},
{opts,[ {opts,[
%% path to PHP CLI binary %% path to PHP CLI binary
%{php, "/usr/local/bin/php"}, %{php, "/usr/local/bin/php"},
%% working dir for PHP (docroot?) %% working dir for PHP (docroot?)
%{dir, "/home/skeltoac/public_html"}, %{dir, "/home/skeltoac/public_html"},
%% initial PHP commands (includes?) %% initial PHP commands (includes?)
%{init, "require('wp-config.php');"}, %{init, "require('wcdb-include.php');"},
%% default maximum memory allowed (Kib or infinity) %% default maximum memory allowed (Kib or infinity)
{maxmem, 102400} {maxmem, 102400}
]}] ]}]
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 226b43b

Please sign in to comment.