xref: /onnv-gate/usr/src/cmd/cmd-inet/usr.lib/in.dhcpd/tests/Makefile (revision 0:68f95e015346)
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, Version 1.0 only
6# (the "License").  You may not use this file except in compliance
7# with the License.
8#
9# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10# or http://www.opensolaris.org/os/licensing.
11# See the License for the specific language governing permissions
12# and limitations under the License.
13#
14# When distributing Covered Code, include this CDDL HEADER in each
15# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16# If applicable, add the following below this CDDL HEADER, with the
17# fields enclosed by brackets "[]" replaced with your own identifying
18# information: Portions Copyright [yyyy] [name of copyright owner]
19#
20# CDDL HEADER END
21#
22#
23# Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
24# Use is subject to license terms.
25#
26# ident	"%Z%%M%	%I%	%E% SMI"
27#
28# cmd/cmd-inet/usr.lib/in.dhcpd/tests/Makefile
29#
30
31COMMON_NET =	$(SRC)/common/net/dhcp
32
33PROG = test_client
34OBJS = test_client.o
35SRCS = $(OBJS:%.o=%.c)
36
37DPROG = test_dstore
38DOBJS = test_dstore.o
39DSRCS = $(OBJS:%.o=%.c)
40
41MPROG = mkdstore
42MOBJS = mkdstore.o
43MSRCS = $(OBJS:%.o=%.c)
44
45include ../../../../Makefile.cmd
46
47DLIBS = -lrt -linetutil -ldhcpsvc -lsocket -lnsl -lmtmalloc
48LDLIBS += $(DLIBS)
49CPPFLAGS += -g -DNDEBUG -D_REENTRANT -I$(COMMON_NET)
50LINTFLAGS += -Xt
51
52.KEEP_STATE:
53
54all: $(PROG) $(DPROG) $(MPROG)
55
56$(PROG): $(OBJS)
57	$(LINK.c) $(OBJS) -o $@ $(LDLIBS)
58	$(POST_PROCESS)
59
60$(DPROG): $(DOBJS)
61	$(LINK.c) $(DOBJS) -o $@ $(LDLIBS)
62	$(POST_PROCESS)
63
64$(MPROG): $(MOBJS)
65	$(LINK.c) $(MOBJS) -o $@ $(LDLIBS)
66	$(POST_PROCESS)
67
68%.o:	$(COMMON_NET)/%.c
69	$(COMPILE.c) $(OUTPUT_OPTION) $<
70	$(POST_PROCESS_O)
71
72clean:
73	$(RM) $(OBJS) $(DOBJS) $(MOBJS)
74
75install:
76	$(ECHO) "Nothing to Install" >&2
77
78
79lint:
80	$(LINT.c) $(PROG).c $(ENVLDLIBS1) $(DLIBS)
81	$(LINT.c) $(DPROG).c $(ENVLDLIBS1) $(DLIBS)
82	$(LINT.c) $(MPROG).c $(ENVLDLIBS1) $(DLIBS)
83
84include ../../../../Makefile.targ
85