1#
2# Port monitor makefile for CUPS.
3#
4# Copyright 2007-2019 by Apple Inc.
5# Copyright 2006 by Easy Software Products.
6#
7# Licensed under Apache License v2.0.  See the file "LICENSE" for more information.
8#
9
10include ../Makedefs
11
12TARGETS	=	bcp tbcp
13
14OBJS	=	bcp.o tbcp.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	$(INSTALL_DIR) -m 755 $(SERVERBIN)/monitor
74	for file in $(TARGETS); do \
75		$(INSTALL_BIN) $$file $(SERVERBIN)/monitor; \
76	done
77	if test "x$(SYMROOT)" != "x"; then \
78		$(INSTALL_DIR) $(SYMROOT); \
79		for file in $(TARGETS); do \
80			cp $$file $(SYMROOT); \
81			dsymutil $(SYMROOT)/$$file; \
82		done \
83	fi
84
85
86#
87# Install headers...
88#
89
90install-headers:
91
92
93#
94# Install libraries...
95#
96
97install-libs:
98
99
100#
101# Uninstall all targets...
102#
103
104uninstall:
105	for file in $(TARGETS); do \
106		$(RM) $(SERVERBIN)/monitor/$$file; \
107	done
108	-$(RMDIR) $(SERVERBIN)/monitor
109	-$(RMDIR) $(SERVERBIN)
110
111
112#
113# bcp
114#
115
116bcp:	bcp.o ../cups/$(LIBCUPS)
117	echo Linking $@...
118	$(LD_CC) $(ALL_LDFLAGS) -o $@ bcp.o $(LINKCUPS)
119	$(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@
120
121
122#
123# tbcp
124#
125
126tbcp:	tbcp.o ../cups/$(LIBCUPS)
127	echo Linking $@...
128	$(LD_CC) $(ALL_LDFLAGS) -o $@ tbcp.o $(LINKCUPS)
129	$(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@
130
131
132#
133# Dependencies...
134#
135
136include Dependencies
137