xref: /titanic_50/usr/src/cmd/nohup/Makefile.com (revision 88f8b78a88cbdc6d8c1af5c3e54bc49d25095c98)
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/nohup/Makefile.com
29#
30
31XPG4PROG = nohup
32PROG = nohup
33
34OBJS = nohup.o
35XPG4OBJS = $(OBJS:%.o=xpg4_%.o)
36SRCS = $(OBJS:%.o=../%.c)
37LNTS = $(OBJS:%.o=%.ln)
38CLEANFILES = $(OBJS) $(XPG4OBJS) $(LNTS)
39
40include ../../Makefile.cmd
41
42CFLAGS += $(CCVERBOSE)
43CFLAGS64 += $(CCVERBOSE)
44
45$(XPG4) := CPPFLAGS += -DXPG4
46
47# not needed for xpg4/nohup
48EXTRALIBS = -lproc
49
50TARGETS = $(PROG) $(XPG4)
51
52.KEEP_STATE:
53
54.PARALLEL: $(OBJS) $(XPG4OBJS) $(LNTS)
55
56all: $(PROG) $(XPG4)
57
58lint:
59	$(LINT.c) $(SRCS) $(LDLIBS) $(EXTRALIBS)
60
61clean:
62	$(RM) $(CLEANFILES)
63
64include ../../Makefile.targ
65
66$(PROG): $(OBJS)
67	$(LINK.c) -o $@ $(OBJS) $(LDLIBS) $(EXTRALIBS)
68	$(POST_PROCESS)
69
70$(XPG4): $(XPG4OBJS)
71	$(LINK.c) -o $@ $(XPG4OBJS) $(LDLIBS)
72	$(POST_PROCESS)
73
74%.o: ../%.c
75	$(COMPILE.c) -o $@ $<
76	$(POST_PROCESS_O)
77
78xpg4_%.o: ../%.c
79	$(COMPILE.c) -o $@ $<
80	$(POST_PROCESS_O)
81