xref: /illumos-gate/usr/src/tools/svc/configd/Makefile (revision 9b9d39d2a32ff806d2431dbcc50968ef1e6d46b2)
1#
2# CDDL HEADER START
3#
4# The contents of this file are subject to the terms of the
5# Common Development and Distribution License (the "License").
6# You may not use this file except in compliance with the License.
7#
8# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9# or http://www.opensolaris.org/os/licensing.
10# See the License for the specific language governing permissions
11# and limitations under the License.
12#
13# When distributing Covered Code, include this CDDL HEADER in each
14# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15# If applicable, add the following below this CDDL HEADER, with the
16# fields enclosed by brackets "[]" replaced with your own identifying
17# information: Portions Copyright [yyyy] [name of copyright owner]
18#
19# CDDL HEADER END
20#
21#
22# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
23# Use is subject to license terms.
24#
25# Copyright 2015 RackTop Systems.
26# Copyright 2020 Joyent, Inc.
27#
28
29include $(SRC)/tools/Makefile.tools
30include $(SRC)/cmd/svc/configd/Makefile.shared.com
31
32
33LIBUUTIL	= $(SRC)/lib/libuutil
34LIBSCF		= $(SRC)/lib/libscf
35LIBSQLITE	= $(SRC)/lib/libsqlite
36
37CPPFLAGS += -I$(SRC)/cmd/svc/configd \
38	-I$(SRC)/cmd/svc/common -I$(SRC)/common/svc \
39	-D_REENTRANT -I$(LIBUUTIL)/common -I$(LIBSCF)/inc -I$(LIBSQLITE) \
40	-I$(SRC)/tools/svc/libsqlite \
41
42CPPFLAGS += -DNATIVE_BUILD
43
44LDFLAGS += $(BDIRECT)
45LDLIBS	+= -L$(NATIVE_ADJUNCT)/lib -R$(NATIVE_ADJUNCT)/lib \
46	-lumem -L$(ROOTONBLDLIBMACH) \
47	-R '$$ORIGIN/../../lib/$(MACH)' -lsqlite-sys -luutil
48
49NATIVE_LIBS += libumem.so libc.so
50
51include $(SRC)/Makefile.native
52
53.KEEP_STATE:
54.PARALLEL: $(OBJS)
55
56all: $(PROG)
57
58$(PROG): $(OBJS)
59	$(LINK.c) -o $@ $(OBJS) $(LDLIBS)
60	$(POST_PROCESS)
61
62%.o: $(SRC)/cmd/svc/configd/%.c
63	$(COMPILE.c) $<
64	$(POST_PROCESS_O)
65
66install: all $(ROOTONBLDMACHPROG)
67
68clean:
69
70clobber: clean
71
72include $(SRC)/cmd/Makefile.targ
73