]> git.saurik.com Git - apple/launchd.git/blame - launchd/src/Makefile.am
launchd-258.25.tar.gz
[apple/launchd.git] / launchd / src / Makefile.am
CommitLineData
f36da725
A
1AM_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
3AM_LDFLAGS = -Wl,-syslibroot,$(SDKROOT)
e91b9f68 4
5b0a4722
A
5CLEANFILES = 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
9protocol_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
12if LIBS_ONLY
e91b9f68
A
13
14noinst_LIBRARIES = liblaunch.a liblaunch_profile.a
15
5b0a4722
A
16liblaunch_a_CFLAGS = -D__DARWIN_NON_CANCELABLE=1 $(AM_CFLAGS)
17liblaunch_a_SOURCES = liblaunch.c libvproc.c libbootstrap.c protocol_vprocUser.c __version.c
e91b9f68 18
5b0a4722
A
19liblaunch_profile_a_CFLAGS = -pg -D__DARWIN_NON_CANCELABLE=1 $(AM_CFLAGS)
20liblaunch_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
30install-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 36else
e91b9f68 37
ed34e3c3 38bin_PROGRAMS = launchctl wait4path
f36da725
A
39if DO_EMBEDDED_MAGIC
40sbin_PROGRAMS = launchd
41else
ed34e3c3 42sbin_PROGRAMS = launchd SystemStarter
f36da725 43endif
ed34e3c3 44libexec_PROGRAMS = launchproxy
e91b9f68 45
5b0a4722 46sysconf_DATA = hostconfig rc.common rc.netboot
e91b9f68 47
f36da725
A
48launchctl_CFLAGS = $(AM_CFLAGS) -I$(SDKROOT)/System/Library/Frameworks/System.framework/PrivateHeaders
49launchctl_LDFLAGS = $(AM_LDFLAGS) -framework CoreFoundation -framework IOKit $(LIBS_SECURITY) -weak_library /usr/lib/libedit.dylib
ed34e3c3 50
f36da725
A
51if DO_EMBEDDED_MAGIC
52else
5b0a4722 53SystemStarter_CFLAGS = -mdynamic-no-pic $(AM_CFLAGS)
f36da725 54SystemStarter_LDFLAGS = $(AM_LDFLAGS) -framework CoreFoundation -framework IOKit
e91b9f68 55SystemStarter_SOURCES = StartupItems.c IPC.c SystemStarter.c
f36da725 56endif
e91b9f68 57
5b0a4722 58launchd_CFLAGS = -mdynamic-no-pic $(AM_CFLAGS) -Wno-unused-parameter
f36da725 59launchd_LDFLAGS = $(AM_LDFLAGS) -lbsm
fe044cc9 60launchd_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 62launchd_runtime.c:: notifyServer.h launchd_internal.h mach_excServer.h
5b0a4722 63launchd_core_logic.c:: protocol_vproc.h job_reply.h protocol_vprocServer.h
e91b9f68 64
f36da725 65launchproxy_LDFLAGS = $(AM_LDFLAGS) $(WEAKLIBS_SECURITY)
e91b9f68 66
ed34e3c3
A
67notifyServer.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
70mach_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
73job_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
76launchd_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
80man1_MANS = wait4path.1 launchctl.1
81
82man5_MANS = launchd.plist.5 launchd.conf.5
83
f36da725
A
84if DO_EMBEDDED_MAGIC
85man8_MANS = launchd.8 launchproxy.8
86else
5b0a4722 87man8_MANS = StartupItemContext.8 SystemStarter.8 rc.8 launchd.8 launchproxy.8
f36da725 88endif
e91b9f68 89
5b0a4722 90install-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
109if DO_EMBEDDED_MAGIC
110else
111 cp $(srcdir)/StartupItemContext $(DESTDIR)/usr/libexec
5b0a4722 112 cp $(srcdir)/com.apple.SystemStarter.plist $(DESTDIR)/System/Library/LaunchDaemons
f36da725 113endif
e91b9f68 114
ed34e3c3 115endif