1# 2# Berkeley 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 information. 8# 9 10include ../Makedefs 11 12 13TARGETS = lpc lpq lpr lprm 14OBJS = lpc.o lpq.o lpr.o lprm.o 15 16 17# 18# Make all targets... 19# 20 21all: $(TARGETS) 22 23 24# 25# Make library targets... 26# 27 28libs: 29 30 31# 32# Make unit tests... 33# 34 35unittests: 36 37 38# 39# Clean all object files... 40# 41 42clean: 43 $(RM) $(OBJS) $(TARGETS) 44 45 46# 47# Update dependencies (without system header dependencies...) 48# 49 50depend: 51 $(CC) -MM $(ALL_CFLAGS) $(OBJS:.o=.c) >Dependencies 52 53 54# 55# Install all targets... 56# 57 58install: all install-data install-headers install-libs install-exec 59 60 61# 62# Install data files... 63# 64 65install-data: 66 67 68# 69# Install programs... 70# 71 72install-exec: 73 echo Installing Berkeley user printing commands in $(BINDIR)... 74 $(INSTALL_DIR) -m 755 $(BINDIR) 75 $(INSTALL_BIN) lpq $(BINDIR) 76 $(INSTALL_BIN) lpr $(BINDIR) 77 $(INSTALL_BIN) lprm $(BINDIR) 78 echo Installing Berkeley admin printing commands in $(BINDIR)... 79 $(INSTALL_DIR) -m 755 $(SBINDIR) 80 $(INSTALL_BIN) lpc $(SBINDIR) 81 if test "x$(SYMROOT)" != "x"; then \ 82 $(INSTALL_DIR) $(SYMROOT); \ 83 for file in $(TARGETS); do \ 84 cp $$file $(SYMROOT); \ 85 dsymutil $(SYMROOT)/$$file; \ 86 done \ 87 fi 88 89 90# 91# Install headers... 92# 93 94install-headers: 95 96 97# 98# Install libraries... 99# 100 101install-libs: 102 103 104# 105# Uninstall all targets... 106# 107 108uninstall: 109 $(RM) $(BINDIR)/lpq 110 $(RM) $(BINDIR)/lpr 111 $(RM) $(BINDIR)/lprm 112 $(RM) $(SBINDIR)/lpc 113 -$(RMDIR) $(SBINDIR) 114 -$(RMDIR) $(BINDIR) 115 116 117# 118# lpc 119# 120 121lpc: lpc.o ../cups/$(LIBCUPS) 122 echo Linking $@... 123 $(LD_CC) $(ALL_LDFLAGS) -o lpc lpc.o $(LINKCUPS) 124 $(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@ 125 126 127# 128# lpq 129# 130 131lpq: lpq.o ../cups/$(LIBCUPS) 132 echo Linking $@... 133 $(LD_CC) $(ALL_LDFLAGS) -o lpq lpq.o $(LINKCUPS) 134 $(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@ 135 136 137# 138# lpr 139# 140 141lpr: lpr.o ../cups/$(LIBCUPS) 142 echo Linking $@... 143 $(LD_CC) $(ALL_LDFLAGS) -o lpr lpr.o $(LINKCUPS) 144 $(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@ 145 146 147# 148# lprm 149# 150 151lprm: lprm.o ../cups/$(LIBCUPS) 152 echo Linking $@... 153 $(LD_CC) $(ALL_LDFLAGS) -o lprm lprm.o $(LINKCUPS) 154 $(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@ 155 156 157# 158# Dependencies... 159# 160 161include Dependencies 162