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