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