1# 2# System V commands makefile for CUPS. 3# 4# Copyright © 2007-2019 by Apple Inc. 5# Copyright © 1997-2006 by Easy Software Products, all rights reserved. 6# 7# Licensed under Apache License v2.0. See the file "LICENSE" for more 8# information. 9# 10 11include ../Makedefs 12 13TARGETS = cancel cupsaccept cupsctl cupstestppd \ 14 lp lpadmin lpinfo lpmove lpoptions lpstat 15OBJS = cancel.o cupsaccept.o cupsctl.o \ 16 cupstestppd.o lp.o lpadmin.o lpinfo.o lpmove.o lpoptions.o \ 17 lpstat.o 18 19 20# 21# Make all targets... 22# 23 24all: $(TARGETS) 25 26 27# 28# Make library targets... 29# 30 31libs: 32 33 34# 35# Make unit tests... 36# 37 38unittests: 39 40 41# 42# Clean all object files... 43# 44 45clean: 46 $(RM) $(OBJS) $(TARGETS) 47 $(RM) cupsdisable cupsenable cupsreject 48 49 50# 51# Update dependencies (without system header dependencies...) 52# 53 54depend: 55 $(CC) -MM $(ALL_CFLAGS) $(OBJS:.o=.c) >Dependencies 56 57 58# 59# Install all targets... 60# 61 62install: all install-data install-headers install-libs install-exec 63 64 65# 66# Install data files... 67# 68 69install-data: 70 71 72# 73# Install programs... 74# 75 76install-exec: 77 echo Installing System V admin printing commands in $(SBINDIR) 78 $(INSTALL_DIR) -m 755 $(SBINDIR) 79 $(INSTALL_BIN) cupsaccept $(SBINDIR) 80 $(INSTALL_BIN) cupsctl $(SBINDIR) 81 $(INSTALL_BIN) lpadmin $(SBINDIR) 82 $(INSTALL_BIN) lpinfo $(SBINDIR) 83 $(INSTALL_BIN) lpmove $(SBINDIR) 84 $(RM) $(SBINDIR)/cupsdisable 85 $(LN) cupsaccept $(SBINDIR)/cupsdisable 86 $(RM) $(SBINDIR)/cupsenable 87 $(LN) cupsaccept $(SBINDIR)/cupsenable 88 $(RM) $(SBINDIR)/cupsreject 89 $(LN) cupsaccept $(SBINDIR)/cupsreject 90 echo Installing System V user printing commands in $(BINDIR) 91 $(INSTALL_DIR) -m 755 $(BINDIR) 92 $(INSTALL_BIN) cancel $(BINDIR) 93 $(INSTALL_BIN) cupstestppd $(BINDIR) 94 $(INSTALL_BIN) lp $(BINDIR) 95 $(INSTALL_BIN) lpoptions $(BINDIR) 96 $(INSTALL_BIN) lpstat $(BINDIR) 97 if test "x$(SYMROOT)" != "x"; then \ 98 $(INSTALL_DIR) $(SYMROOT); \ 99 for file in $(TARGETS); do \ 100 cp $$file $(SYMROOT); \ 101 dsymutil $(SYMROOT)/$$file; \ 102 done \ 103 fi 104 105 106# 107# Install headers... 108# 109 110install-headers: 111 112 113# 114# Install libraries... 115# 116 117install-libs: 118 119 120# 121# Uninstall all targets... 122# 123 124uninstall: 125 $(RM) $(BINDIR)/cancel 126 $(RM) $(BINDIR)/cupstestppd 127 $(RM) $(BINDIR)/lp 128 $(RM) $(BINDIR)/lpoptions 129 $(RM) $(BINDIR)/lpstat 130 -$(RMDIR) $(BINDIR) 131 $(RM) $(SBINDIR)/cupsaccept 132 $(RM) $(SBINDIR)/cupsaccept 133 $(RM) $(SBINDIR)/cupsdisable 134 $(RM) $(SBINDIR)/cupsenable 135 $(RM) $(SBINDIR)/cupsreject 136 $(RM) $(SBINDIR)/lpadmin 137 $(RM) $(SBINDIR)/lpinfo 138 $(RM) $(SBINDIR)/lpmove 139 -$(RMDIR) $(SBINDIR) 140 141 142# 143# cancel 144# 145 146cancel: cancel.o ../cups/$(LIBCUPS) 147 echo Linking $@... 148 $(LD_CC) $(ALL_LDFLAGS) -o cancel cancel.o $(LINKCUPS) 149 $(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@ 150 151 152# 153# cupsaccept 154# 155 156cupsaccept: cupsaccept.o ../cups/$(LIBCUPS) 157 echo Linking $@... 158 $(LD_CC) $(ALL_LDFLAGS) -o cupsaccept cupsaccept.o $(LINKCUPS) 159 $(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@ 160 for file in cupsenable cupsdisable cupsreject; do \ 161 $(RM) $$file; \ 162 $(LN) cupsaccept $$file; \ 163 done 164 165 166# 167# cupsctl 168# 169 170cupsctl: cupsctl.o ../cups/$(LIBCUPS) 171 echo Linking $@... 172 $(LD_CC) $(ALL_LDFLAGS) -o cupsctl cupsctl.o $(LINKCUPS) 173 $(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@ 174 175 176# 177# cupstestppd 178# 179 180cupstestppd: cupstestppd.o ../cups/$(LIBCUPS) 181 echo Linking $@... 182 $(LD_CC) $(ALL_LDFLAGS) -o $@ cupstestppd.o -lm $(LINKCUPS) 183 $(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@ 184 185cupstestppd-static: cupstestppd.o ../cups/$(LIBCUPSSTATIC) 186 echo Linking $@... 187 $(LD_CC) $(ALL_LDFLAGS) -o $@ cupstestppd.o $(LINKCUPSSTATIC) 188 $(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@ 189 190 191# 192# lp 193# 194 195lp: lp.o ../cups/$(LIBCUPS) 196 echo Linking $@... 197 $(LD_CC) $(ALL_LDFLAGS) -o lp lp.o $(LINKCUPS) 198 $(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@ 199 200 201# 202# lpadmin 203# 204 205lpadmin: lpadmin.o ../cups/$(LIBCUPS) 206 echo Linking $@... 207 $(LD_CC) $(ALL_LDFLAGS) -o lpadmin lpadmin.o $(LINKCUPS) 208 $(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@ 209 210 211# 212# lpinfo 213# 214 215lpinfo: lpinfo.o ../cups/$(LIBCUPS) 216 echo Linking $@... 217 $(LD_CC) $(ALL_LDFLAGS) -o lpinfo lpinfo.o $(LINKCUPS) 218 $(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@ 219 220 221# 222# lpmove 223# 224 225lpmove: lpmove.o ../cups/$(LIBCUPS) 226 echo Linking $@... 227 $(LD_CC) $(ALL_LDFLAGS) -o lpmove lpmove.o $(LINKCUPS) 228 $(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@ 229 230 231# 232# lpoptions 233# 234 235lpoptions: lpoptions.o ../cups/$(LIBCUPS) 236 echo Linking $@... 237 $(LD_CC) $(ALL_LDFLAGS) -o lpoptions lpoptions.o $(LINKCUPS) 238 $(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@ 239 240 241# 242# lpstat 243# 244 245lpstat: lpstat.o ../cups/$(LIBCUPS) 246 echo Linking $@... 247 $(LD_CC) $(ALL_LDFLAGS) -o lpstat lpstat.o $(LINKCUPS) 248 $(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@ 249 250 251# 252# Dependencies... 253# 254 255include Dependencies 256