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