Makefile revision 824
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington###############################################################################
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews#
a02a0a8a7eb461619931f4a0e896afa247b52c54Mark Andrews# libowconfig Makefile
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews#
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews# Use is subject to license terms.
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrews#
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington# Permission is hereby granted, free of charge, to any person obtaining a
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington# copy of this software and associated documentation files (the
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews# "Software"), to deal in the Software without restriction, including
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington# without limitation the rights to use, copy, modify, merge, publish,
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews# distribute, and/or sell copies of the Software, and to permit persons
0756445a735e2df39bf798d8de42ae5dd030aa3bMark Andrews# to whom the Software is furnished to do so, provided that the above
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrews# copyright notice(s) and this permission notice appear in all copies of
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# the Software and that both the above copyright notice(s) and this
f8f37672a57524560fbdde52484e6ae3de1c3354Mark Andrews# permission notice appear in supporting documentation.
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews#
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
0756445a735e2df39bf798d8de42ae5dd030aa3bMark Andrews# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson# INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson# FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson#
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews# Except as contained in this notice, the name of a copyright holder
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington# shall not be used in advertising or otherwise to promote the sale, use
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews# or other dealings in this Software without prior written authorization
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# of the copyright holder.
bac2ed6ec3fbb5420e6ce69dd1218745d4e02b1eMark Andrews#
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews# ident "@(#)Makefile 1.6 09/11/09 SMI"
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews#
bac2ed6ec3fbb5420e6ce69dd1218745d4e02b1eMark Andrews
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark AndrewsSHLIBLDFLAGS = -G -z defs $(LDFLAGS)
4038ab55037184d76153afd3c469aa8c85adf85dMark AndrewsREQUIREDLIBS = -lc
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark AndrewsHEADERS = \
bac2ed6ec3fbb5420e6ce69dd1218745d4e02b1eMark Andrews Sunowconfig.h
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews
068a66979695c77359e7a9181bb3f831c965b21cMark AndrewsSRCS = \
a0624cf8d5711cca4e3907859fbc8062a7e460faMark Andrews OWconfig.c
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark AndrewsOBJS = \
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson OWconfig.o
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews# Inspired by automake 1.11 silent rules - hides details by default
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson# Run make V=1 to show details
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark AndrewsDEFAULT_V = 0
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark AndrewsV_CC = $(V_CC_$(V))
91216cff91b34c9ff6e846dc23f248219cafe660Andreas GustafssonV_CC_ = $(V_CC_$(DEFAULT_V))
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark AndrewsV_CC_0 = @echo " CC " $@;
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrewsall: libowconfig.so.0
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrewslibowconfig.so.0: $(OBJS)
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews $(V_CC)$(LD) $(CFLAGS) -o $@ $(SHLIBLDFLAGS) -h libowconfig.so.0 \
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews $(OBJS) $(REQUIREDLIBS)
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrews.c.o:
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews $(V_CC)$(CC) -Kpic $(CFLAGS) $(CPPFLAGS) -c $<
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark AndrewsINCDIR = $(X11_INCLUDES_DIR)/X11
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrews
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrewsinstall: libowconfig.so.0
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews mkdir -p $(DESTDIR)$(libdir) $(DESTDIR)$(INCDIR)
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews $(INSTALL) libowconfig.so.0 $(DESTDIR)$(libdir)/libowconfig.so.0
eaccf5e805405de257b5a4840256c580fefe00e3Mark Andrews $(INSTALL) Sunowconfig.h $(DESTDIR)$(INCDIR)/Sunowconfig.h
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews