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