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 (the "License"). 6# You may not use this file except in compliance with the License. 7# 8# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9# or http://www.opensolaris.org/os/licensing. 10# See the License for the specific language governing permissions 11# and limitations under the License. 12# 13# When distributing Covered Code, include this CDDL HEADER in each 14# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15# If applicable, add the following below this CDDL HEADER, with the 16# fields enclosed by brackets "[]" replaced with your own identifying 17# information: Portions Copyright [yyyy] [name of copyright owner] 18# 19# CDDL HEADER END 20# 21# 22# Copyright (c) 2008-2009, Intel Corporation. 23# All Rights Reserved. 24# 25# Copyright (c) 2018, Joyent, Inc. 26# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. 27 28PROG = latencytop 29OBJS = latencytop.o display.o dwrapper.o klog.o stat.o table.o util.o 30 31include ../Makefile.cmd 32include ../Makefile.cmd.64 33 34CFLAGS += $(CCVERBOSE) 35 36CERRWARN += $(CNOWARN_UNINIT) 37 38# smatch has problems parsing the glib header files 39SMATCH=off 40 41CPPFLAGS += -DEMBED_CONFIGS -I$(ADJUNCT_PROTO)/usr/include/glib-2.0 \ 42 -I$(ADJUNCT_PROTO)/usr/lib/glib-2.0/include 43CSTD = $(CSTD_GNU99) 44LDLIBS += -lcurses -ldtrace 45NATIVE_LIBS += libglib-2.0.so 46all install := LDLIBS += -lglib-2.0 47 48FILEMODE = 0555 49 50WRAPOBJ = latencytop_wrap.o 51 52CLEANFILES += $(OBJS) $(WRAPOBJ) ./latencytop_d ./latencytop_trans 53 54.KEEP_STATE: 55 56all: $(PROG) 57 58install: all $(ROOTPROG) 59 60$(PROG): $(OBJS) $(WRAPOBJ) 61 $(LINK.c) -o $@ $(OBJS) $(WRAPOBJ) $(LDLIBS) 62 $(POST_PROCESS) 63 64latencytop_d: latencytop.d 65 $(CP) $^ $@ 66 67latencytop_trans: latencytop.trans 68 $(CP) $^ $@ 69 70$(WRAPOBJ): latencytop_d latencytop_trans 71 $(ELFWRAP) -64 -o $(WRAPOBJ) latencytop_d \ 72 latencytop_trans 73 74clean: 75 $(RM) $(CLEANFILES) 76 77include ../Makefile.targ 78