xref: /illumos-gate/usr/src/cmd/od/Makefile (revision 8226594fdd4479be135127f43632f1f995074654)
1#
2# This file and its contents are supplied under the terms of the
3# Common Development and Distribution License ("CDDL"), version 1.0.
4# You may only use this file in accordance with the terms of version
5# 1.0 of the CDDL.
6#
7# A full copy of the text of the CDDL should have accompanied this
8# source.  A copy of the CDDL is also available via the Internet at
9# http://www.illumos.org/license/CDDL.
10#
11
12#
13# Copyright 2010 Nexenta Systems, Inc.  All rights reserved.
14#
15
16PROG=		od
17XPG4PROG=	$(PROG)
18
19OBJS=		od.o
20SRCS=	 	$(OBJS:%.o=%.c)
21
22include ../Makefile.cmd
23
24CLOBBERFILES=	$(PROG)
25
26CSTD=	$(CSTD_GNU99)
27
28CPPFLAGS +=	-D__EXTENSIONS__ -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
29
30# install rules
31$(ROOTINC)/% : %
32	$(INS.file)
33
34.KEEP_STATE:
35
36.PARALLEL: $(OBJS)
37
38all:		$(PROG)
39
40$(PROG):	$(OBJS)
41	$(LINK.c) $(OBJS) -o $@ $(LDLIBS)
42	$(POST_PROCESS)
43
44install: all .WAIT $(ROOTPROG) $(ROOTXPG4PROG)
45
46$(ROOTXPG4PROG):
47	-$(RM) $@
48	-$(LN) -s ../../bin/$(PROG) $@
49
50clean:
51	$(RM) $(OBJS)
52
53include ../Makefile.targ
54