]> git.ipfire.org Git - thirdparty/cups.git/blob - notifier/Makefile
License change: Apache License, Version 2.0.
[thirdparty/cups.git] / notifier / Makefile
1 #
2 # Notifier makefile for CUPS.
3 #
4 # Copyright 2007-2017 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) $(LDFLAGS) -o dbus dbus.o $(DBUS_NOTIFIERLIBS) $(LIBS)
123
124
125 #
126 # mailto
127 #
128
129 mailto: mailto.o ../cups/$(LIBCUPS)
130 echo Linking $@...
131 $(LD_CC) $(LDFLAGS) -o mailto mailto.o $(LIBS)
132
133
134 #
135 # rss
136 #
137
138 rss: rss.o ../cups/$(LIBCUPS)
139 echo Linking $@...
140 $(LD_CC) $(LDFLAGS) -o rss rss.o $(LIBS)
141
142
143 #
144 # testnotify
145 #
146
147 testnotify: testnotify.o ../cups/$(LIBCUPS)
148 echo Linking $@...
149 $(LD_CC) $(LDFLAGS) -o testnotify testnotify.o $(LIBS)
150
151
152 $(OBJS): ../Makedefs
153
154 include Dependencies