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# 23# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. 24# Copyright 2015 RackTop Systems. 25# 26 27all: $(PROG) $(DMODPROG) 28 29.NO_PARALLEL: 30.PARALLEL: $(OBJS) $(LINTFILES) $(DMOD_OBJS) $(DMODLINTFILES) 31 32$(PROG): $(OBJS) $(APIMAP) 33 $(LINK.c) $(OBJS) -o $@ $(LDLIBS) 34 $(CTFMERGE) -L VERSION -o $@ $(OBJS) 35 $(POST_PROCESS_SO) 36 37$(DMODPROG): $(DMOD_OBJS) 38 -@mkdir -p $(@D) 39 $(LINK.c) $(DMOD_OBJS) -o $@ $(LDLIBS) 40 $(POST_PROCESS) 41 42%.o: %.c 43 $(COMPILE.c) $< 44 $(CTFCONVERT_O) 45 46%.o: $(SRCDIR)/%.c 47 $(COMPILE.c) $< 48 $(CTFCONVERT_O) 49 50clean: 51 $(RM) $(OBJS) $(DMOD_OBJS) $(LINTFILES) $(DMODLINTFILES) $(CLEANFILES) 52 53clobber: clean 54 $(RM) $(PROG) $(DMODPROG) 55 56%.ln: %.c 57 $(LINT.c) -c $< 58 59%.ln: $(SRCDIR)/%.c 60 $(LINT.c) -c $< 61 62lint_prog: $(LINTFILES) 63 $(LINT) $(LINTFLAGS) $(LINTFILES) $(LDLIBS) 64 65lint_dmod: $(DMODLINTFILES) 66 $(LINT) $(LINTFLAGS) $(DMODLINTFILES) $(LDLIBS) 67 68lint: lint_prog $(DMODLINTTGT) 69 70install_h: 71 72$(ROOTPLUGINDIR)/%: $(PROG) 73 $(RM) $@; $(LN) -s $< $@ 74 75$(ROOTPLUGINDIR64)/%: $(PROG) 76 $(RM) $@; $(LN) -s $< $@ 77 78$(ROOTPROG): $$(@D) $(PROG) 79 $(RM) $@; $(INS) -s -m 0755 -f $(@D) $(PROG) 80 81$(ROOTPROG64): $$(@D) $(PROG) 82 $(RM) $@; $(INS) -s -m 0755 -f $(@D) $(PROG) 83 84$(ROOTDMOD): $$(@D) $(DMODPROG) 85 $(RM) $@; $(INS) -s -m 0755 -f $(@D) $(DMODPROG) 86 87include ../../../../Makefile.rootdirs 88