]> git.saurik.com Git - apple/mdnsresponder.git/blob - Clients/Makefile
mDNSResponder-66.3.tar.gz
[apple/mdnsresponder.git] / Clients / Makefile
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 $
23 # Revision 1.4 2004/05/21 17:25:56 cheshire
24 # Fixes to make sample client work on Linux
25 #
26 # Revision 1.3 2004/03/12 08:05:32 cheshire
27 # Add a "make clean" target
28 #
29 # Revision 1.2 2004/02/11 20:59:26 cheshire
30 # Fix Makefile so it creates the "build" directory if necessary
31 #
32 # Revision 1.1 2004/02/06 03:19:09 cheshire
33 # Check in code to make command-line "dns-sd" testing tool
34 #
35 #
36 # Notes:
37 # $@ means "The file name of the target of the rule"
38 # $< means "The name of the first prerequisite"
39 # $+ means "The names of all the prerequisites, with spaces between them, exactly as given"
40 # For more magic automatic variables, see
41 # <http://www.gnu.org/software/make/manual/html_chapter/make_10.html#SEC111>
42
43 #############################################################################
44
45
46 # If library /usr/lib/libmdns.* exists, then link it
47 ifneq "$(wildcard /usr/lib/libmdns.*)" ""
48 LIBS = -lmdns
49 else
50 LIBS =
51 endif
52
53 targets: build/dns-sd
54
55 clean:
56 rm -rf build
57
58 build:
59 mkdir build
60
61 build/dns-sd: build dns-sd.c
62 cc $(filter %.c %.o, $+) $(LIBS) -o $@