]> git.ipfire.org Git - thirdparty/cups.git/blob - berkeley/Makefile
688efedb08bd0aa92b0629d5306dd5fd086a64f0
[thirdparty/cups.git] / berkeley / Makefile
1 #
2 # Berkeley commands makefile for CUPS.
3 #
4 # Copyright 2007-2012 by Apple Inc.
5 # Copyright 1997-2006 by Easy Software Products, all rights reserved.
6 #
7 # These coded instructions, statements, and computer programs are the
8 # property of Apple Inc. and are protected by Federal copyright
9 # law. Distribution and use rights are outlined in the file "LICENSE.txt"
10 # which should have been included with this file. If this file is
11 # file is missing or damaged, see the license at "http://www.cups.org/".
12 #
13
14 include ../Makedefs
15
16
17 TARGETS = lpc lpq lpr lprm
18 OBJS = lpc.o lpq.o lpr.o lprm.o
19
20
21 #
22 # Make all targets...
23 #
24
25 all: $(TARGETS)
26
27
28 #
29 # Make library targets...
30 #
31
32 libs:
33
34
35 #
36 # Make unit tests...
37 #
38
39 unittests:
40
41
42 #
43 # Clean all object files...
44 #
45
46 clean:
47 $(RM) $(OBJS) $(TARGETS)
48
49
50 #
51 # Update dependencies (without system header dependencies...)
52 #
53
54 depend:
55 $(CC) -MM $(ALL_CFLAGS) $(OBJS:.o=.c) >Dependencies
56
57
58 #
59 # Install all targets...
60 #
61
62 install: all install-data install-headers install-libs install-exec
63
64
65 #
66 # Install data files...
67 #
68
69 install-data:
70
71
72 #
73 # Install programs...
74 #
75
76 install-exec:
77 echo Installing Berkeley user printing commands in $(BINDIR)...
78 $(INSTALL_DIR) -m 755 $(BINDIR)
79 $(INSTALL_BIN) lpq $(BINDIR)
80 $(INSTALL_BIN) lpr $(BINDIR)
81 $(INSTALL_BIN) lprm $(BINDIR)
82 echo Installing Berkeley admin printing commands in $(BINDIR)...
83 $(INSTALL_DIR) -m 755 $(SBINDIR)
84 $(INSTALL_BIN) lpc $(SBINDIR)
85 if test "x$(SYMROOT)" != "x"; then \
86 $(INSTALL_DIR) $(SYMROOT); \
87 for file in $(TARGETS); do \
88 cp $$file $(SYMROOT); \
89 dsymutil $(SYMROOT)/$$file; \
90 done \
91 fi
92
93
94 #
95 # Install headers...
96 #
97
98 install-headers:
99
100
101 #
102 # Install libraries...
103 #
104
105 install-libs:
106
107
108 #
109 # Uninstall all targets...
110 #
111
112 uninstall:
113 $(RM) $(BINDIR)/lpq
114 $(RM) $(BINDIR)/lpr
115 $(RM) $(BINDIR)/lprm
116 $(RM) $(SBINDIR)/lpc
117 -$(RMDIR) $(SBINDIR)
118 -$(RMDIR) $(BINDIR)
119
120
121 #
122 # lpc
123 #
124
125 lpc: lpc.o ../cups/$(LIBCUPS)
126 echo Linking $@...
127 $(CC) $(LDFLAGS) -o lpc lpc.o $(LIBS)
128
129
130 #
131 # lpq
132 #
133
134 lpq: lpq.o ../cups/$(LIBCUPS)
135 echo Linking $@...
136 $(CC) $(LDFLAGS) -o lpq lpq.o $(LIBS)
137
138
139 #
140 # lpr
141 #
142
143 lpr: lpr.o ../cups/$(LIBCUPS)
144 echo Linking $@...
145 $(CC) $(LDFLAGS) -o lpr lpr.o $(LIBS)
146
147
148 #
149 # lprm
150 #
151
152 lprm: lprm.o ../cups/$(LIBCUPS)
153 echo Linking $@...
154 $(CC) $(LDFLAGS) -o lprm lprm.o $(LIBS)
155
156
157 #
158 # Dependencies...
159 #
160
161 include Dependencies