summaryrefslogtreecommitdiff
path: root/Makefile.in
blob: 81d2b7a600d8f70bd51dbcc3bdb4dfdd8396895d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56

ZEND_DIR = $(srcdir)/Zend
SUBDIRS = Zend main ext sapi $(TSRM_DIR) $(REGEX_DIR) . $(PEAR_DIR)

LTLIBRARY_NAME = libphp4.la
LTLIBRARY_SOURCES = stub.c

LTLIBRARY_DEPENDENCIES = \
		Zend/libZend.la \
		sapi/$(PHP_SAPI)/libsapi.la \
		main/libmain.la \
		$(REGEX_LIB) \
		$(EXT_LTLIBS) \
		$(TSRM_LIB)

LTLIBRARY_LDFLAGS = -rpath $(phptempdir) $(EXTRA_LDFLAGS) $(LDFLAGS) $(PHP_RPATHS)
LTLIBRARY_LIBADD = $(LTLIBRARY_DEPENDENCIES) $(EXTRA_LIBS)

PROGRAM_NAME         = php
PROGRAM_SOURCES      = stub.c
PROGRAM_LDADD        = libphp4.la
PROGRAM_LDFLAGS      = -export-dynamic	
PROGRAM_DEPENDENCIES = $(PROGRAM_LDADD)

targets = $(LTLIBRARY_NAME) $(PHP_PROGRAM)

install_targets = install-sapi install-modules

include $(top_srcdir)/build/rules.mk
include $(top_srcdir)/build/library.mk
include $(top_srcdir)/build/program.mk

install-sapi:
	@$(LIBTOOL) --silent --mode=install cp libphp4.la $(phptempdir)/libphp4.la >/dev/null 2>&1
	-@$(mkinstalldirs) $(bindir)
	-@if test ! -r $(phptempdir)/libphp4.$(SHLIB_SUFFIX_NAME); then \
		for i in 0.0.0 0.0 0; do \
			if test -r $(phptempdir)/libphp4.$(SHLIB_SUFFIX_NAME).$$i; then \
				$(LN_S) $(phptempdir)/libphp4.$(SHLIB_SUFFIX_NAME).$$i $(phptempdir)/libphp4.$(SHLIB_SUFFIX_NAME); \
				break; \
			fi; \
		done; \
	fi
	$(INSTALL_IT)

install-modules:
	@test -d modules && \
	$(mkinstalldirs) $(moduledir) && \
	echo "installing shared modules into $(moduledir)" && \
	rm -f modules/*.la && \
	cp modules/* $(moduledir) >/dev/null 2>&1 || true

install-su: install-modules
	(cd pear && $(MAKE) install)

.NOEXPORT: