]> git.ipfire.org Git - thirdparty/cups.git/blob - notifier/Makefile
dd3e5c8600570d5642c2cbb6a52765378264a4e8
[thirdparty/cups.git] / notifier / Makefile
1 #
2 # Notifier makefile for CUPS.
3 #
4 # Copyright 2007-2012 by Apple Inc.
5 # Copyright 1997-2007 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 NOTIFIERS = $(DBUS_NOTIFIER) mailto rss
18 TARGETS = $(NOTIFIERS) testnotify
19 OBJS = dbus.o mailto.o rss.o testnotify.o
20
21
22 #
23 # Make all targets...
24 #
25
26 all: $(TARGETS)
27
28
29 #
30 # Make library targets...
31 #
32
33 libs:
34
35
36 #
37 # Make unit tests...
38 #
39
40 unittests:
41
42
43 #
44 # Clean all object files...
45 #
46
47 clean:
48 $(RM) $(OBJS) $(TARGETS) dbus.h
49
50
51 #
52 # Install all targets...
53 #
54
55 install: all install-data install-headers install-libs install-exec
56
57
58 #
59 # Install data files...
60 #
61
62 install-data:
63 $(INSTALL_DIR) -m 775 -g $(CUPS_GROUP) $(CACHEDIR)/rss
64
65
66 #
67 # Install programs...
68 #
69
70 install-exec:
71 echo Installing notifiers in $(SERVERBIN)/notifier...
72 $(INSTALL_DIR) -m 755 $(SERVERBIN)/notifier
73 for file in $(NOTIFIERS); do \
74 $(INSTALL_BIN) $$file $(SERVERBIN)/notifier; \
75 done
76 if test "x$(SYMROOT)" != "x"; then \
77 $(INSTALL_DIR) $(SYMROOT); \
78 for file in $(NOTIFIERS); do \
79 cp $$file $(SYMROOT); \
80 dsymutil $(SYMROOT)/$$file; \
81 done \
82 fi
83
84
85 #
86 # Install headers...
87 #
88
89 install-headers:
90
91
92 #
93 # Install libraries...
94 #
95
96 install-libs:
97
98
99 #
100 # Uninstall all targets...
101 #
102
103 uninstall:
104 for file in $(NOTIFIERS); do \
105 $(RM) $(SERVERBIN)/notifier/$$file; \
106 done
107 -$(RMDIR) $(SERVERBIN)/notifier
108 -$(RMDIR) $(SERVERBIN)
109 -$(RMDIR) $(CACHEDIR)/rss
110
111
112 #
113 # Update dependencies (without system header dependencies...)
114 #
115
116 depend:
117 $(CC) -MM $(ALL_CFLAGS) $(OBJS:.o=.c) >Dependencies
118
119
120 #
121 # dbus
122 #
123
124 dbus: dbus.o ../cups/$(LIBCUPS)
125 echo Linking $@...
126 $(CC) $(LDFLAGS) -o dbus dbus.o $(DBUS_NOTIFIERLIBS) $(LIBS)
127
128
129 #
130 # mailto
131 #
132
133 mailto: mailto.o ../cups/$(LIBCUPS)
134 echo Linking $@...
135 $(CC) $(LDFLAGS) -o mailto mailto.o $(LIBS)
136
137
138 #
139 # rss
140 #
141
142 rss: rss.o ../cups/$(LIBCUPS)
143 echo Linking $@...
144 $(CC) $(LDFLAGS) -o rss rss.o $(LIBS)
145
146
147 #
148 # testnotify
149 #
150
151 testnotify: testnotify.o ../cups/$(LIBCUPS)
152 echo Linking $@...
153 $(CC) $(LDFLAGS) -o testnotify testnotify.o $(LIBS)
154
155
156 $(OBJS): ../Makedefs
157
158 include Dependencies