]>
Commit | Line | Data |
---|---|---|
ef416fc2 | 1 | # |
503b54c9 | 2 | # Notifier makefile for CUPS. |
ef416fc2 | 3 | # |
21609267 | 4 | # Copyright 2007-2019 by Apple Inc. |
503b54c9 | 5 | # Copyright 1997-2007 by Easy Software Products, all rights reserved. |
ef416fc2 | 6 | # |
e3101897 | 7 | # Licensed under Apache License v2.0. See the file "LICENSE" for more information. |
ef416fc2 | 8 | # |
9 | ||
10 | include ../Makedefs | |
11 | ||
12 | ||
c5571a1d MS |
13 | NOTIFIERS = $(DBUS_NOTIFIER) mailto rss |
14 | TARGETS = $(NOTIFIERS) testnotify | |
15 | OBJS = dbus.o mailto.o rss.o testnotify.o | |
ef416fc2 | 16 | |
17 | ||
18 | # | |
19 | # Make all targets... | |
20 | # | |
21 | ||
22 | all: $(TARGETS) | |
23 | ||
24 | ||
c9fc04c6 MS |
25 | # |
26 | # Make library targets... | |
27 | # | |
28 | ||
29 | libs: | |
30 | ||
31 | ||
5f64df29 MS |
32 | # |
33 | # Make unit tests... | |
34 | # | |
35 | ||
36 | unittests: | |
37 | ||
38 | ||
ef416fc2 | 39 | # |
40 | # Clean all object files... | |
41 | # | |
42 | ||
43 | clean: | |
c5571a1d | 44 | $(RM) $(OBJS) $(TARGETS) dbus.h |
ef416fc2 | 45 | |
46 | ||
47 | # | |
48 | # Install all targets... | |
49 | # | |
50 | ||
50fe7201 MS |
51 | install: all install-data install-headers install-libs install-exec |
52 | ||
53 | ||
54 | # | |
55 | # Install data files... | |
56 | # | |
57 | ||
58 | install-data: | |
b94f7488 | 59 | $(INSTALL_DIR) -m 775 -g $(CUPS_GROUP) $(CACHEDIR)/rss |
ef416fc2 | 60 | |
61 | ||
50fe7201 MS |
62 | # |
63 | # Install programs... | |
64 | # | |
65 | ||
66 | install-exec: | |
c5571a1d | 67 | echo Installing notifiers in $(SERVERBIN)/notifier... |
50fe7201 | 68 | $(INSTALL_DIR) -m 755 $(SERVERBIN)/notifier |
c5571a1d MS |
69 | for file in $(NOTIFIERS); do \ |
70 | $(INSTALL_BIN) $$file $(SERVERBIN)/notifier; \ | |
71 | done | |
49d87452 MS |
72 | if test "x$(SYMROOT)" != "x"; then \ |
73 | $(INSTALL_DIR) $(SYMROOT); \ | |
c1420c87 MS |
74 | for file in $(NOTIFIERS); do \ |
75 | cp $$file $(SYMROOT); \ | |
76 | dsymutil $(SYMROOT)/$$file; \ | |
77 | done \ | |
49d87452 | 78 | fi |
50fe7201 MS |
79 | |
80 | ||
81 | # | |
82 | # Install headers... | |
83 | # | |
84 | ||
85 | install-headers: | |
86 | ||
87 | ||
88 | # | |
89 | # Install libraries... | |
90 | # | |
91 | ||
92 | install-libs: | |
93 | ||
94 | ||
757d2cad | 95 | # |
96 | # Uninstall all targets... | |
97 | # | |
98 | ||
99 | uninstall: | |
c5571a1d | 100 | for file in $(NOTIFIERS); do \ |
757d2cad | 101 | $(RM) $(SERVERBIN)/notifier/$$file; \ |
102 | done | |
103 | -$(RMDIR) $(SERVERBIN)/notifier | |
104 | -$(RMDIR) $(SERVERBIN) | |
b94f7488 | 105 | -$(RMDIR) $(CACHEDIR)/rss |
757d2cad | 106 | |
107 | ||
ef416fc2 | 108 | # |
109 | # Update dependencies (without system header dependencies...) | |
110 | # | |
111 | ||
112 | depend: | |
12f89d24 | 113 | $(CC) -MM $(ALL_CFLAGS) $(OBJS:.o=.c) >Dependencies |
ef416fc2 | 114 | |
115 | ||
c5571a1d MS |
116 | # |
117 | # dbus | |
118 | # | |
119 | ||
120 | dbus: dbus.o ../cups/$(LIBCUPS) | |
121 | echo Linking $@... | |
21609267 | 122 | $(LD_CC) $(ALL_LDFLAGS) -o dbus dbus.o $(DBUS_NOTIFIERLIBS) $(LIBS) |
00dbe99f | 123 | $(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@ |
c5571a1d | 124 | |
c5571a1d | 125 | |
ef416fc2 | 126 | # |
127 | # mailto | |
128 | # | |
129 | ||
130 | mailto: mailto.o ../cups/$(LIBCUPS) | |
131 | echo Linking $@... | |
21609267 | 132 | $(LD_CC) $(ALL_LDFLAGS) -o mailto mailto.o $(LIBS) |
00dbe99f | 133 | $(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@ |
ef416fc2 | 134 | |
135 | ||
f7deaa1a | 136 | # |
137 | # rss | |
138 | # | |
139 | ||
140 | rss: rss.o ../cups/$(LIBCUPS) | |
141 | echo Linking $@... | |
21609267 | 142 | $(LD_CC) $(ALL_LDFLAGS) -o rss rss.o $(LIBS) |
00dbe99f | 143 | $(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@ |
f7deaa1a | 144 | |
145 | ||
ef416fc2 | 146 | # |
147 | # testnotify | |
148 | # | |
149 | ||
150 | testnotify: testnotify.o ../cups/$(LIBCUPS) | |
151 | echo Linking $@... | |
21609267 | 152 | $(LD_CC) $(ALL_LDFLAGS) -o testnotify testnotify.o $(LIBS) |
00dbe99f | 153 | $(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@ |
ef416fc2 | 154 | |
155 | ||
156 | $(OBJS): ../Makedefs | |
157 | ||
158 | include Dependencies |