xref: /onnv-gate/usr/src/cmd/cmd-inet/usr.lib/in.dhcpd/tests/Makefile (revision 2248:4609e8bb25ad)
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
30COMMON_NET =	$(SRC)/common/net/dhcp
31
32PROG = test_client
33OBJS = test_client.o
34SRCS = $(OBJS:%.o=%.c)
35
36DPROG = test_dstore
37DOBJS = test_dstore.o
38DSRCS = $(OBJS:%.o=%.c)
39
40MPROG = mkdstore
41MOBJS = mkdstore.o
42MSRCS = $(OBJS:%.o=%.c)
43
44include ../../../../Makefile.cmd
45
46DLIBS = -linetutil -ldhcpsvc -lsocket -lnsl -lmtmalloc
47LDLIBS += $(DLIBS)
48CPPFLAGS += -g -DNDEBUG -D_REENTRANT -I$(COMMON_NET)
49LINTFLAGS += -Xt
50
51.KEEP_STATE:
52
53all: $(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
71clean:
72	$(RM) $(OBJS) $(DOBJS) $(MOBJS)
73
74install:
75	$(ECHO) "Nothing to Install" >&2
76
77
78lint:
79	$(LINT.c) $(PROG).c $(ENVLDLIBS1) $(DLIBS)
80	$(LINT.c) $(DPROG).c $(ENVLDLIBS1) $(DLIBS)
81	$(LINT.c) $(MPROG).c $(ENVLDLIBS1) $(DLIBS)
82
83include ../../../../Makefile.targ
84