]>
Commit | Line | Data |
---|---|---|
ed34e3c3 | 1 | AM_CFLAGS = -no-cpp-precomp -F/System/Library/PrivateFrameworks -Wall -W -Wshadow -Wmissing-prototypes -Wmissing-declarations -Werror -D__MigTypeCheck=1 |
e91b9f68 | 2 | |
ed34e3c3 A |
3 | CLEANFILES = bootstrap.h bootstrapServer.c bootstrapUser.c bootstrapServer.h notifyServer.c notifyServer.h mpm_replyUser.c mpm_reply.h |
4 | ||
5 | bootstrap.h bootstrapServer.c bootstrapUser.c bootstrapServer.h: $(srcdir)/bootstrap.defs | |
6 | mig $(MIGFLAGS) -sheader bootstrapServer.h $(srcdir)/bootstrap.defs | |
7 | ||
8 | if LIBS_ONLY | |
e91b9f68 A |
9 | |
10 | noinst_LIBRARIES = liblaunch.a liblaunch_profile.a | |
11 | ||
ed34e3c3 | 12 | liblaunch_a_SOURCES = liblaunch.c bootstrap_public.c |
e91b9f68 | 13 | |
ed34e3c3 A |
14 | liblaunch_profile_a_CFLAGS = -pg $(AM_CFLAGS) |
15 | liblaunch_profile_a_SOURCES = liblaunch.c bootstrap_public.c | |
e91b9f68 | 16 | |
ed34e3c3 | 17 | bootstrap_public.c:: bootstrap.h |
e91b9f68 | 18 | |
ed34e3c3 A |
19 | install-data-hook: |
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 | |
e91b9f68 | 24 | |
ed34e3c3 | 25 | else |
e91b9f68 | 26 | |
ed34e3c3 | 27 | sbin_SCRIPTS = service |
e91b9f68 | 28 | |
ed34e3c3 A |
29 | bin_PROGRAMS = launchctl wait4path |
30 | sbin_PROGRAMS = launchd SystemStarter | |
31 | libexec_PROGRAMS = launchproxy | |
e91b9f68 | 32 | |
ed34e3c3 | 33 | sysconf_DATA = hostconfig rc.common rc.netboot rc.shutdown |
e91b9f68 | 34 | |
ed34e3c3 A |
35 | launchctl_CFLAGS = $(AM_CFLAGS) -fvisibility=hidden |
36 | launchctl_LDFLAGS = -framework CoreFoundation -weak_library /usr/lib/libedit.dylib | |
37 | ||
38 | SystemStarter_CFLAGS = -mdynamic-no-pic $(AM_CFLAGS) -fvisibility=hidden | |
e91b9f68 A |
39 | SystemStarter_LDFLAGS = -framework CoreFoundation |
40 | SystemStarter_SOURCES = StartupItems.c IPC.c SystemStarter.c | |
41 | ||
ed34e3c3 | 42 | launchd_CFLAGS = -mdynamic-no-pic $(AM_CFLAGS) -Wno-unused-parameter -fvisibility=hidden |
e91b9f68 | 43 | launchd_LDFLAGS = -lbsm |
ed34e3c3 A |
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 |
45 | ||
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 | |
e91b9f68 A |
49 | |
50 | launchproxy_LDFLAGS = -weak_framework Security | |
51 | ||
ed34e3c3 A |
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 | |
e91b9f68 | 54 | |
ed34e3c3 A |
55 | mpm_replyUser.c mpm_reply.h: $(srcdir)/mpm_reply.defs |
56 | mig $(MIGFLAGS) -sheader /dev/null -server /dev/null $(srcdir)/mpm_reply.defs | |
57 | ||
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 | |
e91b9f68 | 60 | |
e91b9f68 A |
61 | |
62 | man1_MANS = wait4path.1 launchctl.1 | |
63 | ||
64 | man5_MANS = launchd.plist.5 launchd.conf.5 | |
65 | ||
ed34e3c3 | 66 | man8_MANS = StartupItemContext.8 SystemStarter.8 rc.8 launchd.8 service.8 launchproxy.8 |
e91b9f68 A |
67 | |
68 | STARTUPITEMS = $(basename $(notdir $(wildcard $(srcdir)/StartupItems/*.plist))) | |
69 | ||
70 | $(addprefix $(DESTDIR)/System/Library/StartupItems/, $(STARTUPITEMS)): | |
71 | mkdir -p $@ | |
72 | cp $(srcdir)/StartupItems/$(notdir $@) $@ | |
73 | chmod 755 $@/$(notdir $@) | |
74 | cp $(srcdir)/StartupItems/$(notdir $@).plist $@/StartupParameters.plist | |
75 | ||
76 | install-startupitems: $(addprefix $(DESTDIR)/System/Library/StartupItems/, $(STARTUPITEMS)) | |
77 | ||
78 | install-data-hook: install-startupitems | |
ed34e3c3 A |
79 | mkdir -p $(DESTDIR)/usr/libexec |
80 | cp $(srcdir)/StartupItemContext $(DESTDIR)/usr/libexec | |
81 | mkdir -p $(DESTDIR)/usr/include/servers | |
e91b9f68 | 82 | cp $(srcdir)/launch.h $(DESTDIR)/usr/include |
ed34e3c3 A |
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 | |
e91b9f68 A |
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 | |
93 | ||
ed34e3c3 | 94 | endif |