1 AM_CFLAGS = -no-cpp-precomp -F/System/Library/PrivateFrameworks -Wall -W -Wshadow -Wmissing-prototypes -Wmissing-declarations -Werror -D__MigTypeCheck=1
3 CLEANFILES = bootstrap.h bootstrapServer.c bootstrapUser.c bootstrapServer.h notifyServer.c notifyServer.h mpm_replyUser.c mpm_reply.h
5 bootstrap.h bootstrapServer.c bootstrapUser.c bootstrapServer.h: $(srcdir)/bootstrap.defs
6 mig $(MIGFLAGS) -sheader bootstrapServer.h $(srcdir)/bootstrap.defs
10 noinst_LIBRARIES = liblaunch.a liblaunch_profile.a
12 liblaunch_a_SOURCES = liblaunch.c bootstrap_public.c
14 liblaunch_profile_a_CFLAGS = -pg $(AM_CFLAGS)
15 liblaunch_profile_a_SOURCES = liblaunch.c bootstrap_public.c
17 bootstrap_public.c:: bootstrap.h
20 mkdir -p $(DESTDIR)/usr/local/lib/system
21 cp liblaunch.a $(DESTDIR)/usr/local/lib/system
22 cp liblaunch.a $(DESTDIR)/usr/local/lib/system/liblaunch_debug.a
23 cp liblaunch_profile.a $(DESTDIR)/usr/local/lib/system/liblaunch_profile.a
27 sbin_SCRIPTS = service
29 bin_PROGRAMS = launchctl wait4path
30 sbin_PROGRAMS = launchd SystemStarter
31 libexec_PROGRAMS = launchproxy
33 sysconf_DATA = hostconfig rc.common rc.netboot rc.shutdown
35 launchctl_CFLAGS = $(AM_CFLAGS) -fvisibility=hidden
36 launchctl_LDFLAGS = -framework CoreFoundation -weak_library /usr/lib/libedit.dylib
38 SystemStarter_CFLAGS = -mdynamic-no-pic $(AM_CFLAGS) -fvisibility=hidden
39 SystemStarter_LDFLAGS = -framework CoreFoundation
40 SystemStarter_SOURCES = StartupItems.c IPC.c SystemStarter.c
42 launchd_CFLAGS = -mdynamic-no-pic $(AM_CFLAGS) -Wno-unused-parameter -fvisibility=hidden
43 launchd_LDFLAGS = -lbsm
44 launchd_SOURCES = launchd.c launchd_core_logic.c launchd_unix_ipc.c launchd_mach_ipc.c init.c bootstrapServer.c notifyServer.c launchd_internalUser.c launchd_internalServer.c mpm_replyUser.c
46 launchd_mach_ipc.c:: bootstrap.h bootstrapServer.h notifyServer.h launchd_internal.h
47 launchd_core_logic.c:: bootstrap.h mpm_reply.h
48 launchd.c:: bootstrap.h launchd_internalServer.h launchd_internal.h notifyServer.h bootstrapServer.h
50 launchproxy_LDFLAGS = -weak_framework Security
52 notifyServer.c notifyServer.h: /usr/include/mach/notify.defs
53 mig $(MIGFLAGS) -header /dev/null -user /dev/null -sheader notifyServer.h /usr/include/mach/notify.defs
55 mpm_replyUser.c mpm_reply.h: $(srcdir)/mpm_reply.defs
56 mig $(MIGFLAGS) -sheader /dev/null -server /dev/null $(srcdir)/mpm_reply.defs
58 launchd_internal.h launchd_internalServer.c launchd_internalUser.c launchd_internalServer.h: $(srcdir)/launchd_internal.defs
59 mig $(MIGFLAGS) -sheader launchd_internalServer.h $(srcdir)/launchd_internal.defs
62 man1_MANS = wait4path.1 launchctl.1
64 man5_MANS = launchd.plist.5 launchd.conf.5
66 man8_MANS = StartupItemContext.8 SystemStarter.8 rc.8 launchd.8 service.8 launchproxy.8
68 STARTUPITEMS = $(basename $(notdir $(wildcard $(srcdir)/StartupItems/*.plist)))
70 $(addprefix $(DESTDIR)/System/Library/StartupItems/, $(STARTUPITEMS)):
72 cp $(srcdir)/StartupItems/$(notdir $@) $@
73 chmod 755 $@/$(notdir $@)
74 cp $(srcdir)/StartupItems/$(notdir $@).plist $@/StartupParameters.plist
76 install-startupitems: $(addprefix $(DESTDIR)/System/Library/StartupItems/, $(STARTUPITEMS))
78 install-data-hook: install-startupitems
79 mkdir -p $(DESTDIR)/usr/libexec
80 cp $(srcdir)/StartupItemContext $(DESTDIR)/usr/libexec
81 mkdir -p $(DESTDIR)/usr/include/servers
82 cp $(srcdir)/launch.h $(DESTDIR)/usr/include
83 cp $(srcdir)/bootstrap_public.h $(DESTDIR)/usr/include/servers/bootstrap.h
84 cp $(srcdir)/bootstrap_public.h $(DESTDIR)/usr/include/servers/bootstrap_defs.h
85 mkdir -p $(DESTDIR)/usr/local/include
86 cp $(srcdir)/launch_priv.h $(DESTDIR)/usr/local/include
87 mkdir -p $(DESTDIR)/$(sysconfdir)/mach_init.d
88 mkdir -p $(DESTDIR)/$(sysconfdir)/mach_init_per_user.d
89 mkdir -p $(DESTDIR)/Library/LaunchDaemons
90 mkdir -p $(DESTDIR)/Library/LaunchAgents
91 mkdir -p $(DESTDIR)/System/Library/LaunchDaemons
92 mkdir -p $(DESTDIR)/System/Library/LaunchAgents