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# 26 27include Makefile.shared.com 28include $(SRC)/cmd/Makefile.ctf 29 30POFILES = \ 31 $(SRCS:%.c=%.po) \ 32 svccfg_grammar.po \ 33 svccfg_lex.po \ 34 ../common/manifest_find.po \ 35 ../common/manifest_hash.po 36 37SRCDIR = . 38COMDIR = ../common 39 40POFILE = $(PROG)_all.po 41 42# svccfg has a name clash with main() and libl.so.1. However, svccfg must 43# still export a number of "yy*" (libl) interfaces. Reduce all other symbols 44# to local scope. 45MAPFILES += $(MAPFILE.LEX) $(MAPFILE.NGB) 46MAPOPTS = $(MAPFILES:%=-Wl,-M%) 47 48CPPFLAGS += -I ../common -I$(ADJUNCT_PROTO)/usr/include/libxml2 49LDFLAGS += $(MAPOPTS) 50 51LDLIBS += -lxml2 -lscf -ll -luutil -lumem -lmd -lnvpair -ltecla 52NATIVE_LIBS += libxml2.so 53 54# because of labels from yacc 55svccfg_lex.o svccfg_grammar.o := CCVERBOSE = 56svccfg_lex.o svccfg_grammar.o := CERRWARN += -_gcc=-Wno-unused-label 57svccfg_lex-native.o := CERRWARN += -_gcc=-Wno-unused-label 58svccfg_grammar-native.o := CERRWARN += -_gcc=-Wno-unused-label 59 60svccfg_help.po := XGETFLAGS = -a 61 62.KEEP_STATE: 63.PARALLEL: $(OBJS) 64 65all debug: $(PROG) 66 67$(PROG): $(OBJS) $(MAPFILES) 68 $(LINK.c) -o $@ $(OBJS) $(LDLIBS) 69 $(POST_PROCESS) 70 71$(POFILES): svccfg_grammar.h 72 73$(POFILE): $(POFILES) 74 cat $(POFILES) > $(POFILE) 75 76install: all $(ROOTUSRSBINPROG) 77 78clean: 79 $(RM) $(OBJS) 80 81include ../../Makefile.targ 82include Makefile.shared.targ 83 84