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