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# Copyright 2010 Sun Microsystems, Inc. All rights reserved. 22# Use is subject to license terms. 23# 24 25PROG= ilbadm 26 27ILB_OBJS = ilbadm.o ilbadm_sg.o ilbadm_rules.o ilbadm_hc.o 28ILB_OBJS += ilbadm_subr.o ilbadm_import.o ilbadm_nat.o ilbadm_stats.o 29LIST_OBJS = list.o 30OBJS = $(ILB_OBJS) $(LIST_OBJS) 31 32ILB_SRCS= $(ILB_OBJS:.o=.c) 33LIST_SRCS= $(LIST_OBJS:%.o=../../../../uts/common/os/%.c) 34 35SRCS= $(ILB_SRC) $(LIST_SRCS) 36 37include ../../../Makefile.cmd 38include ../../../Makefile.ctf 39include ../../Makefile.cmd-inet 40 41LDLIBS += -lsocket -lnsl -lilb -linetutil -lkstat 42CPPFLAGS += -I$(SRC)/lib/libilb/common -I$(SRC)/uts/common 43 44C99MODE = $(C99_ENABLE) 45 46POFILES = $(ILB_OBJS:%.o=%.po) 47POFILE = $(PROG)_all.po 48 49.KEEP_STATE: 50.PARALLEL: 51 52all: $(PROG) 53 54$(PROG): $(OBJS) 55 $(LINK.c) -o $@ $(OBJS) $(LDLIBS) 56 $(POST_PROCESS) 57 58$(POFILE): $(POFILES) 59 $(RM) $@ 60 cat $(POFILES) > $@ 61 62install: all $(ROOTUSRSBINPROG) 63 64clean: 65 $(RM) $(OBJS) $(POFILES) 66 67lint: $(ILB_SRCS) 68 $(LINT.c) $(ILB_SRCS) $(LDLIBS) 69 70check: $(ILB_SRCS) $(PROG).h 71 $(CSTYLE) -pP $(ILB_SRCS) $(PROG).h 72 $(HDRCHK) $(PROG).h 73 74include ../../../Makefile.targ 75 76# the below is needed to get list.o built 77%.o: ../../../../uts/common/os/%.c 78 $(COMPILE.c) -o $@ $< 79 $(POST_PROCESS_O) 80