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 2012 Nexenta Systems, Inc. All rights reserved. 14 # Copyright 2014 Garrett D'Amore <garrett@damore.org> 15 # 16 17 PROG= man 18 LINKS= apropos whatis catman 19 LIBLINKS = makewhatis 20 OBJS= makewhatis.o man.o stringlist.o 21 SRCS= $(OBJS:%.o=%.c) 22 23 include $(SRC)/cmd/Makefile.cmd 24 25 CFLAGS += $(CCVERBOSE) 26 27 ROOTLINKS= $(LINKS:%=$(ROOTBIN)/%) $(LIBLINKS:%=$(ROOTLIB)/%) 28 29 .KEEP_STATE : 30 31 all: $(PROG) 32 33 clean: 34 $(RM) $(OBJS) 35 36 install: all $(ROOTPROG) $(ROOTLINKS) 37 38 lint: lint_SRCS 39 40 $(PROG): $(OBJS) 41 $(LINK.c) $(OBJS) -o $@ $(LDLIBS) 42 $(POST_PROCESS) 43 44 $(ROOTLINKS): $(ROOTPROG) 45 $(RM) $@; $(LN) $(ROOTPROG) $@ 46 47 include $(SRC)/cmd/Makefile.targ