1 0 stevel # 2 0 stevel # CDDL HEADER START 3 0 stevel # 4 0 stevel # The contents of this file are subject to the terms of the 5 2248 raf # Common Development and Distribution License (the "License"). 6 2248 raf # You may not use this file except in compliance with the License. 7 0 stevel # 8 0 stevel # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9 0 stevel # or http://www.opensolaris.org/os/licensing. 10 0 stevel # See the License for the specific language governing permissions 11 0 stevel # and limitations under the License. 12 0 stevel # 13 0 stevel # When distributing Covered Code, include this CDDL HEADER in each 14 0 stevel # file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15 0 stevel # If applicable, add the following below this CDDL HEADER, with the 16 0 stevel # fields enclosed by brackets "[]" replaced with your own identifying 17 0 stevel # information: Portions Copyright [yyyy] [name of copyright owner] 18 0 stevel # 19 0 stevel # CDDL HEADER END 20 0 stevel # 21 0 stevel # 22 10265 Krishnendu # Copyright 2009 Sun Microsystems, Inc. All rights reserved. 23 0 stevel # Use is subject to license terms. 24 0 stevel # 25 0 stevel 26 0 stevel PROG = cpustat 27 0 stevel OBJS = $(PROG).o caps.o time.o setgrp.o strtoset.o 28 0 stevel SRCS = $(OBJS:%.o=../common/%.c) 29 0 stevel 30 0 stevel include ../../Makefile.cmd 31 0 stevel 32 10265 Krishnendu STATCOMMONDIR = $(SRC)/cmd/stat/common 33 10265 Krishnendu 34 10265 Krishnendu STAT_COMMON_OBJS = timestamp.o 35 10265 Krishnendu STAT_COMMON_SRCS = $(STAT_COMMON_OBJS:%.o=$(STATCOMMONDIR)/%.c) 36 10265 Krishnendu SRCS += $(STAT_COMMON_SRCS) 37 10265 Krishnendu 38 0 stevel CFLAGS += $(CCVERBOSE) $(CTF_FLAGS) 39 10265 Krishnendu CPPFLAGS += -D_REENTRANT -I$(SRC)/lib/libcpc/common -I$(STATCOMMONDIR) 40 2248 raf LDLIBS += -lcpc -lkstat 41 0 stevel 42 0 stevel .KEEP_STATE: 43 0 stevel 44 0 stevel all: $(PROG) 45 0 stevel 46 10265 Krishnendu $(PROG): $(OBJS) $(STAT_COMMON_OBJS) 47 10265 Krishnendu $(LINK.c) $(OBJS) $(STAT_COMMON_OBJS) -o $@ $(LDLIBS) 48 0 stevel $(POST_PROCESS) 49 10265 Krishnendu $(CTFMERGE) -L VERSION -o $@ $(OBJS) $(STAT_COMMON_OBJS) 50 0 stevel 51 0 stevel install: all $(ROOTUSRSBINPROG) 52 0 stevel 53 0 stevel clean: 54 10265 Krishnendu $(RM) $(OBJS) $(STAT_COMMON_OBJS) 55 0 stevel 56 0 stevel lint: lint_SRCS 57 0 stevel 58 0 stevel strip: all 59 0 stevel $(STRIP) $(PROG) 60 0 stevel 61 0 stevel %.o: ../common/%.c 62 10265 Krishnendu $(COMPILE.c) $< 63 10265 Krishnendu $(CTFCONVERT_O) 64 10265 Krishnendu 65 10265 Krishnendu %.o: $(STATCOMMONDIR)/%.c 66 0 stevel $(COMPILE.c) $< 67 0 stevel $(CTFCONVERT_O) 68 0 stevel 69 0 stevel POFILES = ../common/$(PROG).po ../common/caps.po 70 0 stevel POFILE = $(PROG)_cmd.po 71 0 stevel 72 0 stevel $(POFILE): $(POFILES) 73 0 stevel $(RM) $@ 74 0 stevel cat $(POFILES) > $@ 75 0 stevel 76 0 stevel include ../../Makefile.targ 77