php-src/Makefile.in
Rasmus Lerdorf c4442ed7c5 Ok, this beast compiles via --with-apxs
Not sure if it actually works yet though.  I have a feeling there are
some -fpic flags missing in the libzend build.  Will test later on
today.
1999-04-25 14:10:23 +00:00

191 lines
6.7 KiB
Makefile

# +----------------------------------------------------------------------+
# | PHP HTML Embedded Scripting Language Version 4.0 |
# +----------------------------------------------------------------------+
# | Copyright (c) 1997-1999 PHP Development Team (See Credits file) |
# +----------------------------------------------------------------------+
# | This program is free software; you can redistribute it and/or modify |
# | it under the terms of one of the following licenses: |
# | |
# | A) the GNU General Public License as published by the Free Software |
# | Foundation; either version 2 of the License, or (at your option) |
# | any later version. |
# | |
# | B) the PHP License as published by the PHP Development Team and |
# | included in the distribution in the file: LICENSE |
# | |
# | This program is distributed in the hope that it will be useful, |
# | but WITHOUT ANY WARRANTY; without even the implied warranty of |
# | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
# | GNU General Public License for more details. |
# | |
# | You should have received a copy of both licenses referred to here. |
# | If you did not, or have any questions about PHP licensing, please |
# | contact core@php.net. |
# +----------------------------------------------------------------------+
#
# $Id$
#
prefix = @prefix@
exec_prefix = @exec_prefix@
srcdir = @srcdir@
VPATH = @srcdir@
bindir = @bindir@
ZEND_DIR = $(srcdir)/libzend
SUBDIRS=$(srcdir)/libzend ext
CC = @CC@
AR = ar rc
BINNAME = @BINNAME@
INSTALL_IT = @INSTALL_IT@
EXTRA_LIBS = @EXTRA_LIBS@
EXT_LIBS = @EXT_LIBS@
INCLUDES = @INCLUDES@
INCLUDE = -I$(srcdir) -I. -I$(ZEND_DIR) $(INCLUDES)
PROF_CFLAGS =
CFLAGS_SHLIB = @CFLAGS_SHLIB@
LDFLAGS_SHLIB = @LDFLAGS_SHLIB@
LDFLAGS_SHLIB_EXPORT = @LDFLAGS_SHLIB_EXPORT@
CPPFLAGS = @CPPFLAGS@
CFLAGS = @CFLAGS@ $(CFLAGS_SHLIB) $(CPPFLAGS) $(INCLUDE) @DEBUG_CFLAGS@ @STRONGHOLD@ $(PROF_CFLAGS)
LDFLAGS = @LDFLAGS@ $(LDFLAGS_SHLIB) $(LDFLAGS_SHLIB_EXPORT) -L$(ZEND_DIR)
REGCFLAGS = $(CFLAGS)
RANLIB = @RANLIB@
YACC = @YACC@
MAINT = @MAINT@
APXS = @APXS@
APXS_LDFLAGS = $(EXTRA_LIBS)
WARNING_LEVEL = @WARNING_LEVEL@
SOURCE = main.c internal_functions.c snprintf.c php3_sprintf.c \
configuration-parser.c configuration-scanner.c request_info.c \
safe_mode.c fopen-wrappers.c php3_realpath.c alloca.c output.c \
php_ini.c
OBJS = main.o internal_functions.o snprintf.o php3_sprintf.o \
configuration-parser.o configuration-scanner.o request_info.o \
safe_mode.o fopen-wrappers.o php3_realpath.o alloca.o output.o \
php_ini.o
PHPLIBS = -L@top_srcdir@/libzend -lzend -Lext -lphpext
LIBS = $(PHPLIBS) $(EXTRA_LIBS) @LIBS@
all: $(BINNAME)
all-recursive clean-recursive distclean-recursive \
maintainer-clean-depend-recursive:
@set fnord $(MAKEFLAGS); amf=$$2; \
for subdir in $(SUBDIRS); do \
target=`echo $@ | sed s/-recursive//`; \
echo "Making $$target in $$subdir"; \
(cd $$subdir && $(MAKE) $$target) || fail=yes; \
done && test -z "$$fail"
# CGI binary or fhttpd module
php: all-recursive $(OBJS) @REGEX_LIB@ @FHTTPD_LIB@
$(CC) $(CFLAGS) -o $(BINNAME) $(LDFLAGS) $(OBJS) $(LIBS)
# Apache modules
libphp3.a libmodphp3.a: all-recursive $(OBJS)
$(AR) $@.tmp $(OBJS)
$(srcdir)/scripts/armerge $@ $@.tmp ext/libphpext.a $(srcdir)/libzend/libzend.a
@rm -f $@.tmp
$(RANLIB) $(BINNAME)
# Apache modules
libmodphp3-so.a: all-recursive $(OBJS)
$(AR) $@.tmp $(OBJS)
$(srcdir)/scripts/armerge $@ $@.tmp ext/libphpext.a $(srcdir)/libzend/libzend.a
@rm -f $@.tmp
$(RANLIB) libmodphp3-so.a
# Apache 1.3 shared module
libphp3.so: $(srcdir)/mod_php3.c libmodphp3-so.a
$(APXS) -c -o libphp3.so $(APXS_LDFLAGS) mod_php3.c libmodphp3-so.a
regex/libregex.a:
(cd regex; $(MAKE) lib)
configuration-parser.h configuration-parser.c: $(srcdir)/configuration-parser.y
bison -p cfg -v -d $(srcdir)/configuration-parser.y -o configuration-parser.c
configuration-scanner.o: configuration-scanner.c
$(CC) $(CFLAGS) -w$(WARNING_LEVEL) -c configuration-scanner.c
configuration-scanner.c: $(srcdir)/configuration-scanner.l
flex -Pcfg -oconfiguration-scanner.c -i $(srcdir)/configuration-scanner.l
clean: clean-recursive
-rm -f libphp3.a libmodphp3.a php *.o
-rm -f test/php.desc test/php.in test/php.out test/php.test
-rm -f test/a.tmp test/b.tmp test/test.dbm*
distclean: clean distclean-recursive
-rm -f *-parser.[ch] *-scanner.c *.output
-rm -f config.status config.cache config.log
-rm -f Makefile Makefile.depend config.h build-defs.h
-rm -f libphp3.module stamp-h
-rm -f regex/*.o regex/*.a regex/*.ih
-rm -f doc/checkdoc doc/funcparse doc/version.ent
-rm -f do-conf test/test.log
-rm -f doc/Makefile regex/Makefile
maintainer-clean-depend: maintainer-clean-depend-recursive
bench: $(BINNAME)
./$(BINNAME) -c. tests/bench.phtml
# can't use a single rule for this because 'test' is a directory
test: regression
regression check: $(BINNAME)
cd test && ./testall
config.status: configure
./config.status --recheck
build-defs.h config.h: stamp-h
stamp-h: config.h.in config.status
CONFIG_FILES='build-defs.h stamp-h' ./config.status
Makefile: Makefile.in config.status
CONFIG_FILES=$@ CONFIG_HEADERS= ./config.status
#
# You must use '--enable-maintainer-mode' with configure to enable
# these rules, which requires autoconf be installed.
#
configure: @MAINT@ configure.in aclocal.m4
cd $(srcdir) && autoconf
config.h.in: @MAINT@ stamp-h.in
stamp-h.in: configure.in aclocal.m4 acconfig.h
cd ${srcdir} && autoheader && touch ${srcdir}/stamp-h.in
install: $(BINNAME)
$(INSTALL_IT)
indent: clean
indent -v -kr -cli4 -ts4 \
-T pval -T HashTable -T Bucket -T Token -T TokenCache -T TokenCacheManager \
-T switch_expr -T internal_function -T control_structure_data \
-T MemoryHashTable -T MemoryBucket \
-T pvalue_value -T Stack *.c *.h
rm -f *~
.c.o:
@rm -f $@
$(CC) $(CFLAGS) -c $< -o $@
@bn=`echo $@ | sed -e 's#functions/##'`; test -f $@ || \
(test "$@" != "$$bn" && test -f "$$bn" && mv $$bn $@)
parser-scanner: configuration-parser.c configuration-scanner.c
depend: parser-scanner
$(CC) $(CFLAGS) -MM $(SOURCE) | perl -pe 's|regex/regex.h||;' > Makefile.depend
$(CC) $(CFLAGS) -MM $(FUNCTIONS_SOURCE) | perl -pe 's|^(.+\.o)|functions/$$1|; s|regex/regex.h||;' >> Makefile.depend
# Local Variables:
# tab-width: 4
# End: