]> git.saurik.com Git - apple/launchd.git/blame - launchd/src/Makefile.am
launchd-106.20.tar.gz
[apple/launchd.git] / launchd / src / Makefile.am
CommitLineData
e91b9f68
A
1AM_CFLAGS = -no-cpp-precomp -F/System/Library/PrivateFrameworks -Wall -W -Wshadow -Wpadded -Werror -fconstant-cfstrings
2
3sbin_SCRIPTS = service
4
5noinst_LIBRARIES = liblaunch.a liblaunch_profile.a
6
7bin_PROGRAMS = launchctl wait4path
8sbin_PROGRAMS = launchd SystemStarter launchd_debugd
9libexec_PROGRAMS = ConsoleMessage register_mach_bootstrap_servers StartupItemContext launchproxy
10
11sysconf_DATA = hostconfig rc rc.common rc.netboot rc.shutdown
12
13ConsoleMessage_LDFLAGS = -framework CoreFoundation
14
15launchctl_LDFLAGS = -framework CoreFoundation -weak_library /usr/lib/libedit.dylib
16
17register_mach_bootstrap_servers_LDFLAGS = -framework CoreFoundation
18
19launchd_debugd_CFLAGS = -mdynamic-no-pic $(AM_CFLAGS)
20launchd_debugd_SOURCES = launchdebugd.c
21
22liblaunch_a_SOURCES = liblaunch.c
23
24liblaunch_profile_a_CFLAGS = -pg $(AM_CFLAGS)
25liblaunch_profile_a_SOURCES = liblaunch.c
26
27SystemStarter_CFLAGS = -mdynamic-no-pic $(AM_CFLAGS)
28SystemStarter_LDFLAGS = -framework CoreFoundation
29SystemStarter_SOURCES = StartupItems.c IPC.c SystemStarter.c
30
31launchd_CFLAGS = -DPID1_REAP_ADOPTED_CHILDREN -mdynamic-no-pic $(AM_CFLAGS) -Wno-unused-parameter
32launchd_LDFLAGS = -lbsm
33launchd_SOURCES = launchd.c init.c bootstrap.c lists.c rpc_services.c bootstrapServer.c
34
35launchproxy_LDFLAGS = -weak_framework Security
36
37CLEANFILES = bootstrap.h bootstrapServer.c bootstrapUser.c
38
39bootstrap.c:: bootstrap.h
40
41bootstrap.h bootstrapServer.c bootstrapUser.c: $(srcdir)/bootstrap.defs
42 mig $(MIGFLAGS) $(srcdir)/bootstrap.defs
43
44man1_MANS = wait4path.1 launchctl.1
45
46man5_MANS = launchd.plist.5 launchd.conf.5
47
48man8_MANS = ConsoleMessage.8 StartupItemContext.8 SystemStarter.8 init.8 rc.8 launchd.8 service.8 launchproxy.8 launchd_debugd.8
49
50STARTUPITEMS = $(basename $(notdir $(wildcard $(srcdir)/StartupItems/*.plist)))
51
52$(addprefix $(DESTDIR)/System/Library/StartupItems/, $(STARTUPITEMS)):
53 mkdir -p $@
54 cp $(srcdir)/StartupItems/$(notdir $@) $@
55 chmod 755 $@/$(notdir $@)
56 cp $(srcdir)/StartupItems/$(notdir $@).plist $@/StartupParameters.plist
57
58install-startupitems: $(addprefix $(DESTDIR)/System/Library/StartupItems/, $(STARTUPITEMS))
59
60install-data-hook: install-startupitems
61 mkdir -p $(DESTDIR)/usr/local/lib/system
62 cp liblaunch.a $(DESTDIR)/usr/local/lib/system
63 cp liblaunch.a $(DESTDIR)/usr/local/lib/system/liblaunch_debug.a
64 cp liblaunch_profile.a $(DESTDIR)/usr/local/lib/system/liblaunch_profile.a
65 mkdir -p $(DESTDIR)/usr/include
66 cp $(srcdir)/launch.h $(DESTDIR)/usr/include
67 mkdir -p $(DESTDIR)/usr/local/include
68 cp $(srcdir)/launch_priv.h $(DESTDIR)/usr/local/include
69 mkdir -p $(DESTDIR)/$(sysconfdir)/mach_init.d
70 mkdir -p $(DESTDIR)/$(sysconfdir)/mach_init_per_user.d
71 mkdir -p $(DESTDIR)/Library/LaunchDaemons
72 mkdir -p $(DESTDIR)/Library/LaunchAgents
73 mkdir -p $(DESTDIR)/System/Library/LaunchDaemons
74 mkdir -p $(DESTDIR)/System/Library/LaunchAgents
75
76install-exec-hook:
77 chmod u+s $(DESTDIR)/$(sbindir)/launchd