]> git.saurik.com Git - apple/mdnsresponder.git/blame - Clients/Makefile
mDNSResponder-107.5.tar.gz
[apple/mdnsresponder.git] / Clients / Makefile
CommitLineData
8e92c31c
A
1# Copyright (c) 2002-2004 Apple Computer, Inc. All rights reserved.
2#
3# @APPLE_LICENSE_HEADER_START@
4#
5# This file contains Original Code and/or Modifications of Original Code
6# as defined in and that are subject to the Apple Public Source License
7# Version 2.0 (the 'License'). You may not use this file except in
8# compliance with the License. Please obtain a copy of the License at
9# http://www.opensource.apple.com/apsl/ and read it before using this
10# file.
11#
12# The Original Code and all software distributed under the License are
13# distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
14# EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
15# INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
16# FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
17# Please see the License for the specific language governing rights and
18# limitations under the License.
19#
20# @APPLE_LICENSE_HEADER_END@
21#
22# $Log: Makefile,v $
4aea607d
A
23# Revision 1.7 2006/01/06 01:06:17 cheshire
24# <rdar://problem/3978979> Compile library and client programs in one pass
25#
7f0064bd
A
26# Revision 1.6 2004/09/24 21:15:26 cheshire
27# <rdar://problem/3724985> Library "libmdns" misnamed; should be "libdns_sd"
28#
29# Revision 1.5 2004/09/02 17:32:45 cheshire
30# Look for headers in ../mDNSShared before we go to /usr/include
31#
8e92c31c
A
32# Revision 1.4 2004/05/21 17:25:56 cheshire
33# Fixes to make sample client work on Linux
34#
35# Revision 1.3 2004/03/12 08:05:32 cheshire
36# Add a "make clean" target
37#
38# Revision 1.2 2004/02/11 20:59:26 cheshire
39# Fix Makefile so it creates the "build" directory if necessary
40#
41# Revision 1.1 2004/02/06 03:19:09 cheshire
42# Check in code to make command-line "dns-sd" testing tool
43#
44#
45# Notes:
46# $@ means "The file name of the target of the rule"
47# $< means "The name of the first prerequisite"
48# $+ means "The names of all the prerequisites, with spaces between them, exactly as given"
49# For more magic automatic variables, see
50# <http://www.gnu.org/software/make/manual/html_chapter/make_10.html#SEC111>
51
52#############################################################################
53
4aea607d
A
54# On OS X the dns_sd library functions are included in libSystem, which is implicitly linked with every executable
55# If /usr/lib/libSystem.dylib exists, then we're on OS X, so we don't need also to link the "dns_sd" shared library
56ifneq "$(wildcard /usr/lib/libSystem.dylib)" ""
8e92c31c 57LIBS =
4aea607d
A
58else
59LIBS = -L../mDNSPosix/build/prod/ -ldns_sd
8e92c31c
A
60endif
61
62targets: build/dns-sd
63
64clean:
65 rm -rf build
66
67build:
68 mkdir build
69
70build/dns-sd: build dns-sd.c
7f0064bd 71 cc $(filter %.c %.o, $+) $(LIBS) -I../mDNSShared -o $@