]> git.ipfire.org Git - thirdparty/cups.git/blob - scripting/php/Makefile
Merge CUPS 1.4svn-r7524.
[thirdparty/cups.git] / scripting / php / Makefile
1 #
2 # "$Id: Makefile 3572 2003-04-08 19:56:25Z mike $"
3 #
4 # PHP Makefile for the Common UNIX Printing System (CUPS).
5 #
6 # Copyright 2007-2008 by Apple Inc.
7 # Copyright 1997-2007 by Easy Software Products, all rights reserved.
8 #
9 # These coded instructions, statements, and computer programs are the
10 # property of Apple Inc. and are protected by Federal copyright
11 # law. Distribution and use rights are outlined in the file "LICENSE.txt"
12 # which should have been included with this file. If this file is
13 # file is missing or damaged, see the license at "http://www.cups.org/".
14 #
15
16 include ../../Makedefs
17
18
19 #
20 # Where to install and how to compile the PHP module...
21 #
22
23 PHPDIR = $(BUILDROOT)`$(PHPCONFIG) --extension-dir`
24 OPTIONS = $(PHPOPTIONS)
25
26
27 #
28 # Object files...
29 #
30
31 OBJS = phpcups.o
32
33
34 #
35 # Targets in this directory...
36 #
37
38 PHPCUPS = phpcups.so
39
40
41 #
42 # Make all targets...
43 #
44
45 all: $(PHPCUPS)
46
47
48 #
49 # Remove object and target files...
50 #
51
52 clean:
53 $(RM) $(OBJS) $(PHPCUPS)
54
55
56 #
57 # Update dependencies (without system header dependencies...)
58 #
59
60 depend:
61 makedepend -Y -I../.. -fDependencies $(OBJS:.o=.c) >/dev/null 2>&1
62
63
64 #
65 # Install all targets...
66 #
67
68 install: all install-data install-headers install-libs install-exec
69
70
71 #
72 # Install data files...
73 #
74
75 install-data:
76
77
78 #
79 # Install programs...
80 #
81
82 install-exec:
83 echo Installing $(PHPCUPS) in $(PHPDIR)
84 $(INSTALL_DIR) $(PHPDIR)
85 $(INSTALL_LIB) $(PHPCUPS) $(PHPDIR)
86 if test "x$(SYMROOT)" != x; then \
87 $(INSTALL_DIR) $(SYMROOT); \
88 cp $(PHPCUPS) $(SYMROOT); \
89 fi
90
91
92 #
93 # Install headers...
94 #
95
96 install-headers:
97
98
99 #
100 # Install libraries...
101 #
102
103 install-libs:
104
105
106 #
107 # Uninstall object and target files...
108 #
109
110 uninstall:
111 $(RM) $(PHPDIR)/$(PHPCUPS)
112 -$(RMDIR) $(PHPDIR)
113
114
115 #
116 # phpcups.so
117 #
118
119 phpcups.so: $(OBJS) ../../Makedefs
120 echo Linking $@...
121 if test `uname` = Darwin; then \
122 DSOFLAGS="-bundle -flat_namespace -undefined suppress $(RC_CFLAGS)"; \
123 else \
124 DSOFLAGS="$(DSOFLAGS)"; \
125 fi; \
126 echo $(DSO) $$DSOFLAGS $(ARCHFLAGS) -o $@ $(OBJS) -L../../cups $(LIBS); \
127 $(DSO) $$DSOFLAGS $(ARCHFLAGS) -o $@ $(OBJS) -L../../cups $(LIBS)
128
129
130 #
131 # Dependencies...
132 #
133
134 include Dependencies
135
136
137 #
138 # End of "$Id: Makefile 3572 2003-04-08 19:56:25Z mike $".
139 #