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# 23# Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved. 24# Copyright 2020 Joyent, Inc. 25# Copyright 2026 Jason King 26# 27 28include $(SRC)/tools/Makefile.tools 29include $(SRC)/cmd/svc/svccfg/Makefile.shared.com 30 31SRCDIR = $(SRC)/cmd/svc/svccfg 32COMDIR = $(SRC)/cmd/svc/common 33 34CPPFLAGS += -I. -I$(SRC)/cmd/svc/svccfg -I$(SRC)/cmd/svc/common \ 35 -I$(NATIVE_ADJUNCT)/include/libxml2 \ 36 -DNATIVE_BUILD \ 37 -I$(LIBSCF)/inc \ 38 -I$(LIBTECLA) \ 39 -I$(LIBUUTIL)/common 40 41LIBSCF = $(SRC)/lib/libscf 42LIBTECLA = $(SRC)/lib/libtecla # just for the header 43LIBUUTIL = $(SRC)/lib/libuutil 44 45SVCCFG_EXTRA_LIBS += -lxml2 -lscf -ll -luutil -lumem -lmd \ 46 -lnvpair 47NATIVE_LIBS += libxml2.so libl.so libumem.so libmd.so libnvpair.so libc.so 48 49LDLIBS += \ 50 -L$(SRC)/tools/svc/libscf -R '$$ORIGIN/../../lib/$(MACH)' \ 51 -L$(NATIVE_ADJUNCT)/lib -R$(NATIVE_ADJUNCT)/lib -L$(ROOTONBLDLIBMACH) \ 52 $(SVCCFG_EXTRA_LIBS) 53 54include $(SRC)/Makefile.native 55 56.KEEP_STATE: 57.PARALLEL: $(OBJS) 58 59all debug: $(PROG) 60 61$(PROG): $(OBJS) $(MAPFILES) 62 $(LINK.c) -o $@ $(OBJS) $(LDLIBS) 63 $(POST_PROCESS) 64 65install: all $(ROOTONBLDMACHPROG) 66 67clean: 68 $(RM) $(OBJS) 69 70include ../../Makefile.targ 71include $(SRC)/cmd/svc/svccfg/Makefile.shared.targ 72