Makefile revision bf56214c0556fa6864189c826d39dbe156bb22a0
4632N/A#
4632N/A# CDDL HEADER START
4632N/A#
4632N/A# The contents of this file are subject to the terms of the
4632N/A# Common Development and Distribution License (the "License").
4632N/A# You may not use this file except in compliance with the License.
4632N/A#
4632N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4632N/A# or http://www.opensolaris.org/os/licensing.
4632N/A# See the License for the specific language governing permissions
4632N/A# and limitations under the License.
4632N/A#
4632N/A# When distributing Covered Code, include this CDDL HEADER in each
4632N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4632N/A# If applicable, add the following below this CDDL HEADER, with the
4632N/A# fields enclosed by brackets "[]" replaced with your own identifying
4632N/A# information: Portions Copyright [yyyy] [name of copyright owner]
4632N/A#
4632N/A# CDDL HEADER END
4632N/A#
4632N/A# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
4632N/A# Use is subject to license terms.
4632N/A#
4632N/A# ident "%Z%%M% %I% %E% SMI"
4632N/A#
4632N/A
4632N/A##############################################
4632N/A#
4632N/A# Makefile for parser
4632N/A#
4632N/A##############################################
4632N/A
4632N/A#
4632N/A# Makefile.vars
4632N/A#
4632N/A
4632N/Ainclude ../../Makefile.vars
4632N/A
4632N/Ainclude $(SRC)/cmd/Makefile.cmd
4632N/A
4632N/ATARGET= mibcodegen
4632N/A
4632N/A#
4632N/AOPTBIN = $(ROOT)/usr/bin
4632N/AOPTPROG = $(PROG:%=$(OPTBIN)/%)
4632N/A
4632N/A#
4632N/A# other variables
4632N/A#
4632N/A
4632N/A.KEEP_STATE:
4632N/A
4632N/ASOURCES.c=\
4632N/A parse.c\
4632N/A backend.c
4632N/A
4632N/ASOURCES.h=\
4632N/A ../snmplib/impl.h\
4632N/A ../snmplib/error.h\
4632N/A ../snmplib/asn1.h\
4632N/A parse.h
4632N/A
4632N/AOBJECTS= $(SOURCES.c:%.c=$(BIN)/%.o)
4632N/A
4632N/AEXT = 1
4632N/AMYLIBS= ../snmplib/$(MACH)/libssasnmp.so.$(EXT)
4632N/AMYLINKLIBS += -L../snmplib -lssasnmp
4632N/A
4632N/ALIBS= -lsocket -lnsl
4632N/A
4632N/ADEFINES= -D$(TARG_SYS)
4632N/A
4632N/ACPPFLAGS += -I. -I../snmplib -I../../include/netmgt
4632N/A
4632N/ACFLAGS += -c
4632N/A
4632N/ALDFLAGS += $(LDLIBS)
4632N/A
4632N/ALINT= lint
4632N/A
4632N/AMIB_HOME= ../mib
4632N/A
4632N/AMIBS= $(MIB_HOME)/mib_core.txt $(MIB_HOME)/mib_example.txt
4632N/A
4632N/ALINTFLAGS= -aumx
4632N/A
4632N/ALINT= lint
4632N/A
4632N/ACLOBBERFILES += $(TARGET)
4632N/A
4632N/A##############################################
4632N/A
4632N/A#
4632N/A# all
4632N/A#
4632N/A
4632N/Aall: $(SOURCES.h) $(TARGET)
4632N/A
4632N/Ainstall: all
4632N/A
4632N/A$(TARGET): $(BIN) $(OBJECTS) $(MYLIBS)
4632N/A $(CC) -o $(TARGET) $(LDFLAGS) $(OBJECTS) $(MYLINKLIBS) $(LIBS)
4632N/A
4632N/A$(BIN)/%.o: %.c
4632N/A $(CC) $(CFLAGS) $(CPPFLAGS) $(DEFINES) $*.c -o $@
4632N/A
4632N/A#
4632N/A# lint
4632N/A#
4632N/A
4632N/Alint:
4632N/A $(LINT) $(CPPFLAGS) $(DEFINES) $(SOURCES.c)
4632N/A
4632N/Alintlib: $(BIN) $(LINTTARGET)
4632N/A
4632N/A$(LINTTARGET) : $(LINTOBJECTS)
4632N/A $(LINT) $(LINTOBJECTS) -o $(LIBNAME)
4632N/A mv llib-l$(LIBNAME).ln $(LINTTARGET)
4632N/A
4632N/A$(BIN)/%.ln: %.c
4632N/A $(LINT) $(CPPFLAGS) $(DEFINES) $*.c -C $(BIN)/$*
4632N/A
4632N/A#
4632N/A# example
4632N/A#
4632N/A
4632N/Aexample:
4632N/A $(TARGET) example $(MIBS);
4632N/A
4632N/A
4632N/A#
4632N/A# directories
4632N/A#
4632N/A
4632N/A$(BIN):
4632N/A @$(TEST) -d $@ || mkdir $@
4632N/A
4632N/A
4632N/A#
4632N/A# clean
4632N/A#
4632N/A
4632N/Aclean:
4632N/A $(RM) $(OBJECTS)
4632N/A
4632N/Ainclude $(SRC)/cmd/Makefile.targ
4632N/A