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