xref: /illumos-gate/usr/src/lib/scsi/plugins/smp/Makefile.targ (revision 2aeafac3612e19716bf8164f89c3c9196342979c)
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) $(DMOD_OBJS)
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) $(CLEANFILES)
52
53clobber: clean
54	$(RM) $(PROG) $(DMODPROG)
55
56
57install_h:
58
59$(ROOTPLUGINDIR)/%: $(PROG)
60	$(RM) $@; $(LN) -s $< $@
61
62$(ROOTPLUGINDIR64)/%: $(PROG)
63	$(RM) $@; $(LN) -s $< $@
64
65$(ROOTPROG): $$(@D) $(PROG)
66	$(RM) $@; $(INS) -s -m 0755 -f $(@D) $(PROG)
67
68$(ROOTPROG64): $$(@D) $(PROG)
69	$(RM) $@; $(INS) -s -m 0755 -f $(@D) $(PROG)
70
71$(ROOTDMOD): $$(@D) $(DMODPROG)
72	$(RM) $@; $(INS) -s -m 0755 -f $(@D) $(DMODPROG)
73
74include ../../../../Makefile.rootdirs
75