]> git.saurik.com Git - apple/launchd.git/blame - launchd/src/Makefile.am
launchd-152.tar.gz
[apple/launchd.git] / launchd / src / Makefile.am
CommitLineData
ed34e3c3 1AM_CFLAGS = -no-cpp-precomp -F/System/Library/PrivateFrameworks -Wall -W -Wshadow -Wmissing-prototypes -Wmissing-declarations -Werror -D__MigTypeCheck=1
e91b9f68 2
ed34e3c3
A
3CLEANFILES = bootstrap.h bootstrapServer.c bootstrapUser.c bootstrapServer.h notifyServer.c notifyServer.h mpm_replyUser.c mpm_reply.h
4
5bootstrap.h bootstrapServer.c bootstrapUser.c bootstrapServer.h: $(srcdir)/bootstrap.defs
6 mig $(MIGFLAGS) -sheader bootstrapServer.h $(srcdir)/bootstrap.defs
7
8if LIBS_ONLY
e91b9f68
A
9
10noinst_LIBRARIES = liblaunch.a liblaunch_profile.a
11
ed34e3c3 12liblaunch_a_SOURCES = liblaunch.c bootstrap_public.c
e91b9f68 13
ed34e3c3
A
14liblaunch_profile_a_CFLAGS = -pg $(AM_CFLAGS)
15liblaunch_profile_a_SOURCES = liblaunch.c bootstrap_public.c
e91b9f68 16
ed34e3c3 17bootstrap_public.c:: bootstrap.h
e91b9f68 18
ed34e3c3
A
19install-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 25else
e91b9f68 26
ed34e3c3 27sbin_SCRIPTS = service
e91b9f68 28
ed34e3c3
A
29bin_PROGRAMS = launchctl wait4path
30sbin_PROGRAMS = launchd SystemStarter
31libexec_PROGRAMS = launchproxy
e91b9f68 32
ed34e3c3 33sysconf_DATA = hostconfig rc.common rc.netboot rc.shutdown
e91b9f68 34
ed34e3c3
A
35launchctl_CFLAGS = $(AM_CFLAGS) -fvisibility=hidden
36launchctl_LDFLAGS = -framework CoreFoundation -weak_library /usr/lib/libedit.dylib
37
38SystemStarter_CFLAGS = -mdynamic-no-pic $(AM_CFLAGS) -fvisibility=hidden
e91b9f68
A
39SystemStarter_LDFLAGS = -framework CoreFoundation
40SystemStarter_SOURCES = StartupItems.c IPC.c SystemStarter.c
41
ed34e3c3 42launchd_CFLAGS = -mdynamic-no-pic $(AM_CFLAGS) -Wno-unused-parameter -fvisibility=hidden
e91b9f68 43launchd_LDFLAGS = -lbsm
ed34e3c3
A
44launchd_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
46launchd_mach_ipc.c:: bootstrap.h bootstrapServer.h notifyServer.h launchd_internal.h
47launchd_core_logic.c:: bootstrap.h mpm_reply.h
48launchd.c:: bootstrap.h launchd_internalServer.h launchd_internal.h notifyServer.h bootstrapServer.h
e91b9f68
A
49
50launchproxy_LDFLAGS = -weak_framework Security
51
ed34e3c3
A
52notifyServer.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
55mpm_replyUser.c mpm_reply.h: $(srcdir)/mpm_reply.defs
56 mig $(MIGFLAGS) -sheader /dev/null -server /dev/null $(srcdir)/mpm_reply.defs
57
58launchd_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
62man1_MANS = wait4path.1 launchctl.1
63
64man5_MANS = launchd.plist.5 launchd.conf.5
65
ed34e3c3 66man8_MANS = StartupItemContext.8 SystemStarter.8 rc.8 launchd.8 service.8 launchproxy.8
e91b9f68
A
67
68STARTUPITEMS = $(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
76install-startupitems: $(addprefix $(DESTDIR)/System/Library/StartupItems/, $(STARTUPITEMS))
77
78install-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 94endif