]> git.saurik.com Git - apple/configd.git/blob - Plugins/SCNetworkReachability/Makefile
configd-699.1.5.tar.gz
[apple/configd.git] / Plugins / SCNetworkReachability / Makefile
1 ARCHS = -arch i386 -arch x86_64
2 CFLAGS = -Wall -pipe -O0 -gdwarf-2
3
4 REACH_SERVER_C = ../../SystemConfiguration.fproj/reachability/SCNetworkReachabilityServer_server.c
5
6 REACH_SERVER_PLIST = /Library/LaunchDaemons/com.apple.SCNetworkReachability.plist
7 SYMROOT = ${shell basename ${shell dirname ${shell dirname ${PWD}}}}
8
9 all: /var/tmp/reach_server ${REACH_SERVER_PLIST}
10
11 ${REACH_SERVER_PLIST}: Makefile
12 @sudo mkdir -p ${shell dirname ${REACH_SERVER_PLIST}}
13 @sudo launchctl unload -w ${REACH_SERVER_PLIST} > /dev/null 2>&1 || /usr/bin/true
14 @sudo rm -f ${REACH_SERVER_PLIST}
15 @sudo defaults write ${REACH_SERVER_PLIST} Label \
16 SCNetworkReachability-DEBUG
17 @sudo defaults write ${REACH_SERVER_PLIST} MachServices \
18 -dict \
19 SCNetworkReachability-DEBUG \
20 -bool TRUE
21 @sudo defaults write ${REACH_SERVER_PLIST} Program \
22 /var/tmp/reach_server
23 @sudo defaults write ${REACH_SERVER_PLIST} ProgramArguments \
24 -array \
25 SCNetworkReachability-DEBUG \
26 verbose
27 @sudo defaults write ${REACH_SERVER_PLIST} EnvironmentVariables \
28 -dict \
29 DYLD_FRAMEWORK_PATH \
30 ${BUILDIT_DIR}/${SYMROOT}.roots/${SYMROOT}~sym \
31 REACH_SERVER \
32 SCNetworkReachability-DEBUG
33 @sudo defaults write ${REACH_SERVER_PLIST} ThrottleInterval \
34 -int 5
35 @sudo chown root:wheel ${REACH_SERVER_PLIST}
36 @sudo chmod 644 ${REACH_SERVER_PLIST}
37 sudo launchctl load -w ${REACH_SERVER_PLIST}
38
39 reach_server.o: ${REACH_SERVER_C}
40 cc ${ARCHS} ${CFLAGS} -DMAIN -I ../../SystemConfiguration.fproj -F ${BUILDIT_DIR}/${SYMROOT}.roots/${SYMROOT}~sym -c -o reach_server.o ${REACH_SERVER_C}
41
42 reach_server: reach_server.o
43 cc ${ARCHS} -o reach_server reach_server.o -framework CoreFoundation -F ${BUILDIT_DIR}/${SYMROOT}.roots/${SYMROOT}~sym -framework SystemConfiguration
44 dsymutil reach_server -o reach_server.dSYM
45
46 /var/tmp/reach_server: reach_server
47 @sudo rm -f /var/tmp/reach_server
48 cp -p reach_server /var/tmp/reach_server
49 @sudo chown root:wheel /var/tmp/reach_server
50 @sudo chmod 755 /var/tmp/reach_server
51
52 clean:
53 sudo launchctl unload -w ${REACH_SERVER_PLIST} > /dev/null 2>&1 || /usr/bin/true
54 @sudo rm -f ${REACH_SERVER_PLIST}
55 @sudo rm -rf /var/tmp/reach_server
56 rm -rf *.o reach_server reach_server.dSYM