2003-11-25 14:44:56 -06:00
|
|
|
|
|
|
|
mkdir -p $OBJS/src/core $OBJS/src/event $OBJS/src/event/modules \
|
|
|
|
$OBJS/src/os/unix $OBJS/src/os/win32 \
|
|
|
|
$OBJS/src/http $OBJS/src/http/modules $OBJS/src/http/modules/proxy
|
|
|
|
|
|
|
|
|
|
|
|
modules="$CORE_MODULES $EVENT_MODULES $HTTP_MODULES \
|
|
|
|
$HTTP_FILTER_MODULES $HTTP_NOT_MODIFIED_FILTER_MODULE"
|
|
|
|
|
|
|
|
|
|
|
|
echo "#include <ngx_config.h>" > $NGX_MODULES_C
|
|
|
|
echo "#include <ngx_core.h>" >> $NGX_MODULES_C
|
|
|
|
echo >> $NGX_MODULES_C
|
|
|
|
|
|
|
|
for mod in $modules
|
|
|
|
do
|
|
|
|
echo "extern ngx_module_t $mod;" >> $NGX_MODULES_C
|
|
|
|
done
|
|
|
|
|
|
|
|
echo >> $NGX_MODULES_C
|
|
|
|
echo 'ngx_module_t *ngx_modules[] = {' >> $NGX_MODULES_C
|
|
|
|
|
|
|
|
for mod in $modules
|
|
|
|
do
|
|
|
|
echo " &$mod," >> $NGX_MODULES_C
|
|
|
|
done
|
|
|
|
|
|
|
|
echo " NULL" >> $NGX_MODULES_C
|
|
|
|
echo "};" >> $NGX_MODULES_C
|
|
|
|
|
|
|
|
|
|
|
|
echo "CC = $CC" > $MAKEFILE
|
|
|
|
echo "CFLAGS = $CFLAGS" >> $MAKEFILE
|
|
|
|
echo >> $MAKEFILE
|
|
|
|
|
|
|
|
echo "CORE_DEPS = \\" >> $MAKEFILE
|
|
|
|
for dep in $CORE_DEPS
|
|
|
|
do
|
2004-03-04 01:04:55 -06:00
|
|
|
if [ $PLATFORM = win32 ]; then
|
|
|
|
dep=`echo $dep | sed -e "s/\//\\\\\\/g"`
|
|
|
|
fi
|
2003-11-25 14:44:56 -06:00
|
|
|
echo " $dep \\" >> $MAKEFILE
|
|
|
|
done
|
|
|
|
echo >> $MAKEFILE
|
|
|
|
|
2004-03-04 01:04:55 -06:00
|
|
|
inc=`echo "$CORE_INCS -I $OBJS" | sed -e "s/\//\\\\\\/g"`
|
|
|
|
echo "CORE_INCS = $inc" >> $MAKEFILE
|
2003-11-25 14:44:56 -06:00
|
|
|
echo >> $MAKEFILE
|
|
|
|
|
|
|
|
echo "HTTP_DEPS = \\" >> $MAKEFILE
|
|
|
|
for inc in $HTTP_DEPS
|
|
|
|
do
|
2004-03-04 01:04:55 -06:00
|
|
|
if [ $PLATFORM = win32 ]; then
|
|
|
|
inc=`echo $inc | sed -e "s/\//\\\\\\/g"`
|
|
|
|
fi
|
2003-11-25 14:44:56 -06:00
|
|
|
echo " $inc \\" >> $MAKEFILE
|
|
|
|
done
|
|
|
|
echo >> $MAKEFILE
|
|
|
|
|
2004-03-04 01:04:55 -06:00
|
|
|
inc=`echo "$HTTP_INCS" | sed -e "s/\//\\\\\\/g"`
|
|
|
|
echo "HTTP_INCS = $inc" >> $MAKEFILE
|
2003-11-25 14:44:56 -06:00
|
|
|
echo >> $MAKEFILE
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
echo "nginx: \\" >> $MAKEFILE
|
|
|
|
|
|
|
|
for src in $CORE_SRCS $HTTP_SRCS
|
|
|
|
do
|
2004-02-24 11:31:46 -06:00
|
|
|
obj=`echo $src | sed -e "s/\.c\$/.$OBJEXT/" -e "s/\.S\$/.$OBJEXT/"`
|
2004-03-04 01:04:55 -06:00
|
|
|
obj="$OBJS/$obj"
|
|
|
|
if [ $PLATFORM = win32 ]; then
|
|
|
|
obj=`echo $obj | sed -e "s/\//\\\\\\/g"`
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo " $obj \\" >> $MAKEFILE
|
2003-11-25 14:44:56 -06:00
|
|
|
done
|
|
|
|
|
|
|
|
for src in $NGX_MODULES_C $LINK_DEPS
|
|
|
|
do
|
|
|
|
obj=`echo $src | sed -e "s/\.c\$/.$OBJEXT/"`
|
2004-03-04 01:04:55 -06:00
|
|
|
if [ $PLATFORM = win32 ]; then
|
|
|
|
obj=`echo $obj | sed -e "s/\//\\\\\\/g"`
|
|
|
|
fi
|
|
|
|
|
2003-11-25 14:44:56 -06:00
|
|
|
echo " $obj \\" >> $MAKEFILE
|
|
|
|
done
|
|
|
|
|
|
|
|
echo >> $MAKEFILE
|
|
|
|
echo " \$(CC) ${BINOUT}nginx \\" >> $MAKEFILE
|
|
|
|
|
|
|
|
for src in $CORE_SRCS $HTTP_SRCS
|
|
|
|
do
|
2004-02-24 11:31:46 -06:00
|
|
|
obj=`echo $src | sed -e "s/\.c\$/.$OBJEXT/" -e "s/\.S\$/.$OBJEXT/"`
|
2004-03-04 01:04:55 -06:00
|
|
|
obj="$OBJS/$obj"
|
|
|
|
if [ $PLATFORM = win32 ]; then
|
|
|
|
obj=`echo $obj | sed -e "s/\//\\\\\\/g"`
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo " $obj \\" >> $MAKEFILE
|
2003-11-25 14:44:56 -06:00
|
|
|
done
|
|
|
|
|
|
|
|
obj=`echo $NGX_MODULES_C | sed -e "s/\.c\$/.$OBJEXT/"`
|
2004-03-04 01:04:55 -06:00
|
|
|
if [ $PLATFORM = win32 ]; then
|
|
|
|
obj=`echo $obj | sed -e "s/\//\\\\\\/g"`
|
|
|
|
fi
|
2003-11-25 14:44:56 -06:00
|
|
|
echo " $obj \\" >> $MAKEFILE
|
|
|
|
echo " $CORE_LIBS \\" >> $MAKEFILE
|
|
|
|
echo " $CORE_LINK" >> $MAKEFILE
|
|
|
|
echo >> $MAKEFILE
|
|
|
|
|
|
|
|
|
|
|
|
deps="\$(CORE_DEPS)"
|
|
|
|
args="\$(CFLAGS) \$(CORE_INCS)"
|
|
|
|
|
|
|
|
echo "$obj: \\" >> $MAKEFILE
|
|
|
|
echo " $NGX_MODULES_C $deps" >> $MAKEFILE
|
|
|
|
echo " \$(CC) -c $args \\" >> $MAKEFILE
|
|
|
|
echo " $OBJOUT$obj \\" >> $MAKEFILE
|
|
|
|
echo " $NGX_MODULES_C" >> $MAKEFILE
|
|
|
|
echo >> $MAKEFILE
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for src in $CORE_SRCS
|
|
|
|
do
|
2004-02-24 11:31:46 -06:00
|
|
|
obj=`echo $src | sed -e "s/\.c\$/.$OBJEXT/" -e "s/\.S\$/.$OBJEXT/"`
|
2003-11-25 14:44:56 -06:00
|
|
|
|
|
|
|
echo "$OBJS/$obj: \\" >> $MAKEFILE
|
|
|
|
echo " $src $deps" >> $MAKEFILE
|
|
|
|
echo " \$(CC) -c $args \\" >> $MAKEFILE
|
|
|
|
echo " $OBJOUT$OBJS/$obj \\" >> $MAKEFILE
|
|
|
|
echo " $src" >> $MAKEFILE
|
|
|
|
echo >> $MAKEFILE
|
|
|
|
done
|
|
|
|
|
|
|
|
|
|
|
|
deps="\$(CORE_DEPS) \$(HTTP_DEPS)"
|
|
|
|
args="\$(CFLAGS) \$(CORE_INCS) \$(HTTP_INCS)"
|
|
|
|
|
|
|
|
for src in $HTTP_SRCS
|
|
|
|
do
|
|
|
|
obj=`echo $src | sed -e "s/\.c\$/.$OBJEXT/"`
|
|
|
|
|
|
|
|
echo "$OBJS/$obj: \\" >> $MAKEFILE
|
|
|
|
echo " $src $deps" >> $MAKEFILE
|
|
|
|
echo " \$(CC) -c $args \\" >> $MAKEFILE
|
|
|
|
echo " $OBJOUT$OBJS/$obj \\" >> $MAKEFILE
|
|
|
|
echo " $src" >> $MAKEFILE
|
|
|
|
echo >> $MAKEFILE
|
|
|
|
done
|