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 # Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
  23 # Use is subject to license terms.
  24 #
  25 # ident "%Z%%M% %I%     %E% SMI"
  26 #
  27 # cmd/cmd-inet/usr.lib/in.dhcpd/tests/Makefile
  28 #
  29 
  30 COMMON_NET =    $(SRC)/common/net/dhcp
  31 
  32 PROG = test_client
  33 OBJS = test_client.o
  34 SRCS = $(OBJS:%.o=%.c)
  35 
  36 DPROG = test_dstore
  37 DOBJS = test_dstore.o
  38 DSRCS = $(OBJS:%.o=%.c)
  39 
  40 MPROG = mkdstore
  41 MOBJS = mkdstore.o
  42 MSRCS = $(OBJS:%.o=%.c)
  43 
  44 include ../../../../Makefile.cmd
  45 
  46 DLIBS = -linetutil -ldhcpsvc -lsocket -lnsl -lmtmalloc
  47 LDLIBS += $(DLIBS)
  48 CPPFLAGS += -g -DNDEBUG -D_REENTRANT -I$(COMMON_NET)
  49 LINTFLAGS += -Xt
  50 
  51 .KEEP_STATE:
  52 
  53 all: $(PROG) $(DPROG) $(MPROG)
  54 
  55 $(PROG): $(OBJS)
  56         $(LINK.c) $(OBJS) -o $@ $(LDLIBS)
  57         $(POST_PROCESS)
  58 
  59 $(DPROG): $(DOBJS)
  60         $(LINK.c) $(DOBJS) -o $@ $(LDLIBS)
  61         $(POST_PROCESS)
  62 
  63 $(MPROG): $(MOBJS)
  64         $(LINK.c) $(MOBJS) -o $@ $(LDLIBS)
  65         $(POST_PROCESS)
  66 
  67 %.o:    $(COMMON_NET)/%.c
  68         $(COMPILE.c) $(OUTPUT_OPTION) $<
  69         $(POST_PROCESS_O)
  70 
  71 clean:
  72         $(RM) $(OBJS) $(DOBJS) $(MOBJS)
  73 
  74 install:
  75         $(ECHO) "Nothing to Install" >&2
  76 
  77 
  78 lint: 
  79         $(LINT.c) $(PROG).c $(ENVLDLIBS1) $(DLIBS)
  80         $(LINT.c) $(DPROG).c $(ENVLDLIBS1) $(DLIBS)
  81         $(LINT.c) $(MPROG).c $(ENVLDLIBS1) $(DLIBS)
  82 
  83 include ../../../../Makefile.targ