xref: /NextBSD/sbin/launchd/Makefile (revision ff21b70c67db75217277053ccaf0c7a4494513eb)
1PROG= launchd
2
3.PATH: .
4.PATH: ${.CURDIR}
5.PATH: ${.CURDIR}/support
6.PATH: ${.CURDIR}/uuid
7.PATH: ${.CURDIR}/init
8
9
10BASE_INCLUDE=  -I. -I${.CURDIR} -I${.CURDIR}/init -I${.CURDIR}/../../include/apple
11BASE_INCLUDE+= -I${.CURDIR}/../../include -I${.CURDIR}/../../sys -I${MACHINE_INCLUDES}
12DEFINES= -D__APPLE__ -fblocks -DLIBC_NO_LIBCRASHREPORTERCLIENT -DPRIVATE
13MIG_FLAGS= ${BASE_INCLUDE} 	${DEFINES}
14#override default CFLAGS
15CFLAGS= ${MIG_FLAGS}  -D__MigTypeCheck
16CFLAGS+= -I${.CURDIR}/../../contrib/openbsm -I${.CURDIR}/../../lib/liblaunch
17CFLAGS+= -DHAVE_INTTYPES_H
18
19DEBUG_FLAGS+= -g -O0
20
21LDFLAGS+= -static
22NO_WERROR=
23
24helper.h launchd_helperServer.h: ${.CURDIR}/helper.defs
25	mig ${MIG_FLAGS} -user /dev/null -server /dev/null -header helper.h \
26	-sheader launchd_helperServer.h ${.CURDIR}/helper.defs
27
28jobServer.h jobServer.c job.h: ${.CURDIR}/job.defs helper.h
29	mig ${MIG_FLAGS} -sheader jobServer.h ${.CURDIR}/job.defs
30job_reply.h job_replyUser.c job_replyServer.c job_replyServer.h: ${.CURDIR}/job_reply.defs
31	mig ${MIG_FLAGS} -header job_reply.h -sheader job_replyServer.h ${.CURDIR}/job_reply.defs
32${.CURDIR}/job_forward.h job_forwardUser.c job_forwardServer.h: ${.CURDIR}/job_forward.defs
33	mig ${MIG_FLAGS} -header job_forward.h -sheader job_forwardServer.h ${.CURDIR}/job_forward.defs
34notify.h notifyServer.c notifyServer.h: ${.CURDIR}/notify.defs
35	mig ${MIG_FLAGS} -header notify.h -sheader notifyServer.h ${.CURDIR}/notify.defs
36mach_excServer.h mach_excServer.c: ${.CURDIR}/mach_exc.defs
37	mig ${MIG_FLAGS} -sheader mach_excServer.h ${.CURDIR}/mach_exc.defs
38internal.h internalServer.h internalServer.c internalUser.c: ${.CURDIR}/internal.defs
39	mig ${MIG_FLAGS} -header internal.h -sheader internalServer.h ${.CURDIR}/internal.defs
40
41
42
43SRCS= jobServer.c mach_excServer.c internalServer.c
44SRCS+= job_forwardUser.c  job_replyUser.c job_replyServer.c notifyServer.c
45SRCS+= internalUser.c
46SRCS+= launchd.c core.c kill2.c ktrace.c ipc.c log.c runtime.c
47SRCS+= init.c
48LIBADD+= auditd bsm util dispatch mach
49LIBADD+=BlocksRuntime launch osxsupport xpc nv sbuf pthread
50
51
52MAN=	launchd.conf.5 launchd.plist.5 launchd.8
53
54launchd.1:
55	MAN=
56
57CLEANFILES+= *Server.c *User.c job.h helper.h job_reply.h job_forward.h notify.h \
58	internal.h mach_exc.h *Server.h *~ cscope.*
59.include <bsd.prog.mk>
60