1 #
2 # CDDL HEADER START
3 #
4 # This file and its contents are supplied under the terms of the
5 # Common Development and Distribution License ("CDDL"), version 1.0.
6 # You may only use this file in accordance with the terms of version
7 # 1.0 of the CDDL.
8 #
9 # A full copy of the text of the CDDL should have accompanied this
10 # source. A copy of the CDDL is also available via the Internet at
11 # http://www.illumos.org/license/CDDL.
12 #
13 # CDDL HEADER END
14 #
15 #
16 # Copyright (c) 2015 by Delphix. All rights reserved.
17 #
18
19 PROG= connstat
20 OBJS= connstat_main.o connstat_mib.o connstat_tcp.o
21 SRCS= $(OBJS:%.o=%.c)
22 POFILES= connstat_main.po connstat_tcp.po connstat_mib.po
23 POFILE= connstat.po
24
25 include ../Makefile.cmd
26 include ../Makefile.ctf
27
28 CSTD= $(CSTD_GNU99)
29 LDLIBS += -lsocket -lnsl -lumem -lofmt
30 XGETFLAGS += -a -x $(PROG).xcl
31
32 .KEEP_STATE:
33
34 all: $(PROG)
35
36 $(PROG): $(OBJS)
37 $(LINK.c) -o $@ $(OBJS) $(LDLIBS)
38 $(POST_PROCESS)
39
40 $(POFILE): $(POFILES)
41 $(RM) $@
42 cat $(POFILES) > $@
43
44 install: all $(ROOTPROG)
45
46 clean:
47 $(RM) $(OBJS)
48
49 lint: lint_SRCS
50
51 include ../Makefile.targ