PREFIX := /usr/local
MODULE_PREFIX := $(PREFIX)/lib/mandshurica
WEBROOT_PREFIX := $(PREFIX)/lib/mandshurica/webroot
+PROJECTS_PREFIX := $(PREFIX)/lib/mandshurica/projects
CC := gcc
-CFLAGS := -g -std=c99 -DPREFIX=\\\"$(PREFIX)\\\" -DWEBROOT_PREFIX=\\\"$(WEBROOT_PREFIX)\\\" -DMODULE_PREFIX=\\\"$(MODULE_PREFIX)\\\" -D_DEFAULT_SOURCE
+CFLAGS := -g -std=c99 -DPREFIX=\\\"$(PREFIX)\\\" -DWEBROOT_PREFIX=\\\"$(WEBROOT_PREFIX)\\\" -DMODULE_PREFIX=\\\"$(MODULE_PREFIX)\\\" -DPROJECTS_PREFIX=\\\"$(PROJECTS_PREFIX)\\\" -D_DEFAULT_SOURCE
LDFLAGS :=
LIBS :=
fprintf(f, "Set CookieDB %s/passwd.db\n", PREFIX);
fprintf(f, "Set HTTPPort 1024\n");
fprintf(f, "Set HTTPRoot %s\n", WEBROOT_PREFIX);
+ fprintf(f, "Set ProjectRoot %s\n", WEBROOT_PREFIX);
fprintf(f, "Set InstancecName Sumire\n");
fprintf(f, "\n");
fprintf(f, "Set HTTPMIME.html text/html\n");
--- /dev/null
+#!/bin/sh
+which gmake 2>/dev/null
+if [ "$?" = "0" ]; then
+ MAKE=gmake
+else
+ MAKE=make
+fi
+if [ "`uname -s`" = "NetBSD" ]; then
+ $MAKE PREFIX=`pwd` MODULE_PREFIX=`pwd`/Module WEBROOT_PREFIX=`pwd`/Webroot PROJECTS_PREFIX=`pwd`/Projects -j`cat /proc/cpuinfo | grep proc | wc -l`
+else
+ $MAKE PREFIX=`pwd` MODULE_PREFIX=`pwd`/Module WEBROOT_PREFIX=`pwd`/Webroot PROJECTS_PREFIX=`pwd`/Projects -j`nproc`
+fi
+exit $?