Makefile revision 7c478bd95313f5f23a4c958a745db2134aa03244
274N/A#
274N/A# CDDL HEADER START
274N/A#
274N/A# The contents of this file are subject to the terms of the
274N/A# Common Development and Distribution License, Version 1.0 only
274N/A# (the "License"). You may not use this file except in compliance
274N/A# with the License.
274N/A#
274N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
274N/A# or http://www.opensolaris.org/os/licensing.
274N/A# See the License for the specific language governing permissions
274N/A# and limitations under the License.
274N/A#
274N/A# When distributing Covered Code, include this CDDL HEADER in each
274N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
274N/A# If applicable, add the following below this CDDL HEADER, with the
274N/A# fields enclosed by brackets "[]" replaced with your own identifying
274N/A# information: Portions Copyright [yyyy] [name of copyright owner]
274N/A#
274N/A# CDDL HEADER END
274N/A#
274N/A#
274N/A# Copyright 1996 Sun Microsystems, Inc. All rights reserved.
274N/A# Use is subject to license terms.
274N/A#
274N/A#pragma ident "%Z%%M% %I% %E% SMI"
274N/A
274N/A#######################################################
274N/A#
618N/A# Makefile for madman_api_test
274N/A#
274N/A#######################################################
274N/A
274N/A#
274N/A# Makefile.vars
274N/A#
274N/A
274N/Ainclude ../../../Makefile.vars
274N/A
274N/A
274N/A#
274N/A# other variables
274N/A#
274N/A
274N/ATARGET1= $(BIN)/madman_api_test
274N/ATARGET2= $(BIN)/asn1_test
274N/ATARGET3= $(BIN)/error_test
274N/ATARGET4= $(BIN)/trap_test
274N/ATARGET5= $(BIN)/madman_trap_test
274N/ATARGET6= $(BIN)/madman_api_test_2
274N/A
274N/A
274N/A.KEEP_STATE:
274N/A
274N/ASOURCES1.c= madman_api_test.c
274N/A
274N/ASOURCES2.c= asn1_test.c
SOURCES3.c= error_test.c
SOURCES4.c= trap_test.c
SOURCES5.c= madman_trap_test.c
SOURCES6.c= madman_api_test_2.c
SOURCES.h=\
../snmp_msg.h\
../impl.h\
../error.h\
../trace.h\
../asn1.h\
../signals.h\
../snmp.h\
../pdu.h\
../request.h\
../snmp_api.h\
../madman_api.h
OBJECTS1= $(SOURCES1.c:%.c=$(BIN)/%.o)
OBJECTS2= $(SOURCES2.c:%.c=$(BIN)/%.o)
OBJECTS3= $(SOURCES3.c:%.c=$(BIN)/%.o)
OBJECTS4= $(SOURCES4.c:%.c=$(BIN)/%.o)
OBJECTS5= $(SOURCES5.c:%.c=$(BIN)/%.o)
OBJECTS6= $(SOURCES6.c:%.c=$(BIN)/%.o)
MYLIBS= ../$(BIN)/libsnmp.a
LIBS= -lsocket -lnsl -lelf -lgen
#LIBS= -lsocket -lnsl -ly -ll -lelf -lgen
CPPFLAGS += -I. -I.. -I${BIN}
CFLAGS += -c
LDFLAGS += $(LDLIBS)
LINT= lint
PURIFY_HOME= /usr/soft/purify3.0
PURIFY= $(PURIFY_HOME)/purify
#######################################################
#
# all
#
all: $(SOURCES.h) $(TARGET1) $(TARGET2) $(TARGET3) $(TARGET4) $(TARGET5) $(TARGET6)
$(TARGET1): $(BIN) $(OBJECTS1) $(MYLIBS)
@echo -------------- $@ linkink begins --------------
$(CC) -o $(TARGET1) $(LDFLAGS) $(OBJECTS1) $(MYLIBS) $(LIBS)
@echo -------------- $@ linkink ended ---------------
$(TARGET2): $(BIN) $(OBJECTS2) $(MYLIBS)
@echo -------------- $@ linkink begins --------------
$(CC) -o $(TARGET2) $(LDFLAGS) $(OBJECTS2) $(MYLIBS) $(LIBS)
@echo -------------- $@ linkink ended ---------------
$(TARGET3): $(BIN) $(OBJECTS3) $(MYLIBS)
@echo -------------- $@ linkink begins --------------
$(CC) -o $(TARGET3) $(LDFLAGS) $(OBJECTS3) $(MYLIBS) $(LIBS)
@echo -------------- $@ linkink ended ---------------
$(TARGET4): $(BIN) $(OBJECTS4) $(MYLIBS)
@echo -------------- $@ linkink begins --------------
$(CC) -o $(TARGET4) $(LDFLAGS) $(OBJECTS4) $(MYLIBS) $(LIBS)
@echo -------------- $@ linkink ended ---------------
$(TARGET5): $(BIN) $(OBJECTS5) $(MYLIBS)
@echo -------------- $@ linkink begins --------------
$(CC) -o $(TARGET5) $(LDFLAGS) $(OBJECTS5) $(MYLIBS) $(LIBS)
@echo -------------- $@ linkink ended ---------------
$(TARGET6): $(BIN) $(OBJECTS6) $(MYLIBS)
@echo -------------- $@ linkink begins --------------
$(CC) -o $(TARGET6) $(LDFLAGS) $(OBJECTS6) $(MYLIBS) $(LIBS)
@echo -------------- $@ linkink ended ---------------
$(BIN)/%.o: %.c
@echo -------------- $@ compile begins --------------
$(CC) $(CFLAGS) $(CPPFLAGS) $(DEFINES) $*.c -o $@
@echo -------------- $@ compile ended ---------------
#
# lint
#
lint:
@echo -------------- $@ begins ----------------------
$(LINT) $(LDFLAGS) $(CPPFLAGS) $(DEFINES) $(SOURCES.c) $(MYLIBS) $(LIBS)
@echo -------------- $@ ended -----------------------
#
# purify
#
purify:
@echo -------------- $@ begins ----------------------
$(PURIFY) $(CC) -o $(TARGET) $(LDFLAGS) $(OBJECTS) $(MYLIBS) $(LIBS)
@echo -------------- $@ ended -----------------------
#
# directories
#
$(BIN):
$(TEST) -d $@ || mkdir $@
#
# clean
#
clean:
rm -f $(OBJECTS)
sccs clean