]> git.saurik.com Git - apple/launchd.git/blob - launchd/src/Makefile.am
launchd-258.18.tar.gz
[apple/launchd.git] / launchd / src / Makefile.am
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)
4
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 \
7 notifyServer.c notifyServer.h job_replyUser.c job_reply.h __version.c mach_excServer.c mach_excServer.h
8
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
11
12 if LIBS_ONLY
13
14 noinst_LIBRARIES = liblaunch.a liblaunch_profile.a
15
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
18
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 > $@
28
29
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
35
36 else
37
38 bin_PROGRAMS = launchctl wait4path
39 if DO_EMBEDDED_MAGIC
40 sbin_PROGRAMS = launchd
41 else
42 sbin_PROGRAMS = launchd SystemStarter
43 endif
44 libexec_PROGRAMS = launchproxy
45
46 sysconf_DATA = hostconfig rc.common rc.netboot
47
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
50
51 if DO_EMBEDDED_MAGIC
52 else
53 SystemStarter_CFLAGS = -mdynamic-no-pic $(AM_CFLAGS)
54 SystemStarter_LDFLAGS = $(AM_LDFLAGS) -framework CoreFoundation -framework IOKit
55 SystemStarter_SOURCES = StartupItems.c IPC.c SystemStarter.c
56 endif
57
58 launchd_CFLAGS = -mdynamic-no-pic $(AM_CFLAGS) -Wno-unused-parameter
59 launchd_LDFLAGS = $(AM_LDFLAGS) -lbsm
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
61
62 launchd_runtime.c:: notifyServer.h launchd_internal.h mach_excServer.h
63 launchd_core_logic.c:: protocol_vproc.h job_reply.h protocol_vprocServer.h
64
65 launchproxy_LDFLAGS = $(AM_LDFLAGS) $(WEAKLIBS_SECURITY)
66
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
69
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
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
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
78
79
80 man1_MANS = wait4path.1 launchctl.1
81
82 man5_MANS = launchd.plist.5 launchd.conf.5
83
84 if DO_EMBEDDED_MAGIC
85 man8_MANS = launchd.8 launchproxy.8
86 else
87 man8_MANS = StartupItemContext.8 SystemStarter.8 rc.8 launchd.8 launchproxy.8
88 endif
89
90 install-data-hook:
91 mkdir -p $(DESTDIR)/usr/libexec
92 mkdir -p $(DESTDIR)/usr/include/servers
93 mkdir -p $(DESTDIR)/usr/local/include
94 mkdir -p $(DESTDIR)/$(sysconfdir)/mach_init.d
95 mkdir -p $(DESTDIR)/$(sysconfdir)/mach_init_per_user.d
96 mkdir -p $(DESTDIR)/$(sysconfdir)/mach_init_per_login_session.d
97 mkdir -p $(DESTDIR)/Library/LaunchDaemons
98 mkdir -p $(DESTDIR)/Library/LaunchAgents
99 mkdir -p $(DESTDIR)/System/Library/LaunchAgents
100 mkdir -p $(DESTDIR)/System/Library/LaunchDaemons
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
109 if DO_EMBEDDED_MAGIC
110 else
111 cp $(srcdir)/StartupItemContext $(DESTDIR)/usr/libexec
112 cp $(srcdir)/com.apple.SystemStarter.plist $(DESTDIR)/System/Library/LaunchDaemons
113 endif
114
115 endif