]> git.saurik.com Git - apple/launchd.git/blob - launchd/src/Makefile.am
788b6f23e6012586bc03bd912ebb48eae475333a
[apple/launchd.git] / launchd / src / Makefile.am
1 AM_CFLAGS = -no-cpp-precomp -F/System/Library/PrivateFrameworks -Wall -Wextra -Waggregate-return -Wshadow -Wmissing-prototypes -Wmissing-declarations -Werror -D__MigTypeCheck=1 -fvisibility=hidden -Dmig_external=__private_extern__
2
3 CLEANFILES = protocol_vproc.h protocol_vprocServer.c protocol_vprocUser.c protocol_vprocServer.h \
4 launchd_internal.h launchd_internalServer.h launchd_internalServer.c launchd_internalUser.c \
5 notifyServer.c notifyServer.h job_replyUser.c job_reply.h __version.c
6
7 protocol_vproc.h protocol_vprocServer.c protocol_vprocUser.c protocol_vprocServer.h: $(srcdir)/protocol_job.defs
8 mig $(MIGFLAGS) -sheader protocol_vprocServer.h $(srcdir)/protocol_job.defs
9
10 if LIBS_ONLY
11
12 noinst_LIBRARIES = liblaunch.a liblaunch_profile.a
13
14 liblaunch_a_CFLAGS = -D__DARWIN_NON_CANCELABLE=1 $(AM_CFLAGS)
15 liblaunch_a_SOURCES = liblaunch.c libvproc.c libbootstrap.c protocol_vprocUser.c __version.c
16
17 liblaunch_profile_a_CFLAGS = -pg -D__DARWIN_NON_CANCELABLE=1 $(AM_CFLAGS)
18 liblaunch_profile_a_SOURCES = liblaunch.c libvproc.c libbootstrap.c protocol_vprocUser.c __version.c
19
20 $(srcdir)/libvproc.c:: protocol_vproc.h
21
22 $(srcdir)/protocol_vprocUser.c:: protocol_vproc.h
23
24 __version.c:
25 /Developer/Makefiles/bin/version.pl launchd_libs > $@
26
27
28 install-data-hook:
29 mkdir -p $(DESTDIR)/usr/local/lib/system
30 cp liblaunch.a $(DESTDIR)/usr/local/lib/system
31 cp liblaunch.a $(DESTDIR)/usr/local/lib/system/liblaunch_debug.a
32 cp liblaunch_profile.a $(DESTDIR)/usr/local/lib/system/liblaunch_profile.a
33
34 else
35
36 bin_PROGRAMS = launchctl wait4path
37 sbin_PROGRAMS = launchd SystemStarter
38 libexec_PROGRAMS = launchproxy
39
40 sysconf_DATA = hostconfig rc.common rc.netboot
41
42 launchctl_CFLAGS = $(AM_CFLAGS) -I/System/Library/Frameworks/System.framework/PrivateHeaders
43 launchctl_LDFLAGS = -framework CoreFoundation -framework IOKit -framework Security -weak_library /usr/lib/libedit.dylib
44
45 SystemStarter_CFLAGS = -mdynamic-no-pic $(AM_CFLAGS)
46 SystemStarter_LDFLAGS = -framework CoreFoundation -framework IOKit
47 SystemStarter_SOURCES = StartupItems.c IPC.c SystemStarter.c
48
49 launchd_CFLAGS = -mdynamic-no-pic $(AM_CFLAGS) -Wno-unused-parameter
50 launchd_LDFLAGS = -lbsm
51 launchd_SOURCES = launchd.c launchd_core_logic.c launchd_unix_ipc.c protocol_vprocServer.c notifyServer.c launchd_internalUser.c launchd_internalServer.c job_replyUser.c launchd_runtime.c launchd_runtime_kill.c
52
53 launchd_runtime.c:: notifyServer.h launchd_internal.h
54 launchd_core_logic.c:: protocol_vproc.h job_reply.h protocol_vprocServer.h
55
56 launchproxy_LDFLAGS = -weak_framework Security
57
58 notifyServer.c notifyServer.h: /usr/include/mach/notify.defs
59 mig $(MIGFLAGS) -header /dev/null -user /dev/null -sheader notifyServer.h /usr/include/mach/notify.defs
60
61 job_replyUser.c job_reply.h: $(srcdir)/protocol_job_reply.defs
62 mig $(MIGFLAGS) -sheader /dev/null -server /dev/null $(srcdir)/protocol_job_reply.defs
63
64 launchd_internal.h launchd_internalServer.c launchd_internalUser.c launchd_internalServer.h: $(srcdir)/launchd_internal.defs
65 mig $(MIGFLAGS) -sheader launchd_internalServer.h $(srcdir)/launchd_internal.defs
66
67
68 man1_MANS = wait4path.1 launchctl.1
69
70 man5_MANS = launchd.plist.5 launchd.conf.5
71
72 man8_MANS = StartupItemContext.8 SystemStarter.8 rc.8 launchd.8 launchproxy.8
73
74 install-data-hook:
75 mkdir -p $(DESTDIR)/usr/libexec
76 mkdir -p $(DESTDIR)/usr/include/servers
77 mkdir -p $(DESTDIR)/usr/local/include
78 mkdir -p $(DESTDIR)/$(sysconfdir)/mach_init.d
79 mkdir -p $(DESTDIR)/$(sysconfdir)/mach_init_per_user.d
80 mkdir -p $(DESTDIR)/$(sysconfdir)/mach_init_per_login_session.d
81 mkdir -p $(DESTDIR)/Library/LaunchDaemons
82 mkdir -p $(DESTDIR)/Library/LaunchAgents
83 mkdir -p $(DESTDIR)/System/Library/LaunchAgents
84 mkdir -p $(DESTDIR)/System/Library/LaunchDaemons
85 cp $(srcdir)/StartupItemContext $(DESTDIR)/usr/libexec
86 cp $(srcdir)/liblaunch_public.h $(DESTDIR)/usr/include/launch.h
87 cp $(srcdir)/libvproc_public.h $(DESTDIR)/usr/include/vproc.h
88 cp $(srcdir)/libbootstrap_public.h $(DESTDIR)/usr/include/servers/bootstrap.h
89 cp $(srcdir)/libbootstrap_public.h $(DESTDIR)/usr/include/servers/bootstrap_defs.h
90 cp $(srcdir)/libbootstrap_private.h $(DESTDIR)/usr/local/include/bootstrap_priv.h
91 cp $(srcdir)/liblaunch_private.h $(DESTDIR)/usr/local/include/launch_priv.h
92 cp $(srcdir)/libvproc_private.h $(DESTDIR)/usr/local/include/vproc_priv.h
93 cp $(srcdir)/reboot2.h $(DESTDIR)/usr/local/include/reboot2.h
94 cp $(srcdir)/com.apple.SystemStarter.plist $(DESTDIR)/System/Library/LaunchDaemons
95
96 endif