Makefile.common revision 1117
2058N/A#
2058N/A# Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved.
2058N/A#
2058N/A# Permission is hereby granted, free of charge, to any person obtaining a
2058N/A# copy of this software and associated documentation files (the "Software"),
2058N/A# to deal in the Software without restriction, including without limitation
2058N/A# the rights to use, copy, modify, merge, publish, distribute, sublicense,
2058N/A# and/or sell copies of the Software, and to permit persons to whom the
2058N/A# Software is furnished to do so, subject to the following conditions:
2058N/A#
2058N/A# The above copyright notice and this permission notice (including the next
2058N/A# paragraph) shall be included in all copies or substantial portions of the
2058N/A# Software.
2058N/A#
2058N/A# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
2058N/A# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
2058N/A# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
2058N/A# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
2058N/A# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
2058N/A# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
3996N/A# DEALINGS IN THE SOFTWARE.
2058N/A#
2058N/A
2058N/AGFX_COMMON = ../../gfx_common
2058N/AINSTALL_LIB_DIR = $(DESTDIR)/usr/lib/sparcv9
2320N/A
2058N/A#
2058N/A# Compilation flags
2058N/A#
2320N/A#DEBUG = -g $(SBFLAG)
2058N/A#DEFS =
2058N/ADEFS = -DVTS_STUBS
2058N/AINCL = -I ../common/include
2058N/AINCL += -I ${GFX_COMMON}/include
3661N/AINCL += -I ${GFX_COMMON}/vts/include
3661N/A
3996N/ACFLAGS += ${DEBUG} -m64 -xCC ${DEFS} -DSUN__${DEV} -Dsun -Dsparc -DSVR4 \
3996N/A -DSYSV -D__EXTENSIONS__ -DDPMSExtension -DXRECORD -DEVI -DSHAPE -DXINPUT \
3996N/A -DXKB -DLBX -DXAPPGROUP -DXCSECURITY -DTOGCUP -DPANORAMIX -DNEED_DBE_BUF_BITS \
2058N/A -DNEED_DBE_BUF_VALIDATE -DPIXPRIV -DFBPM -DSUNSOFT -DSUNSOFT_BUYBACK -DXDPS \
2058N/A -DNEED_LINEHELPER -DINCLUDE_ALLOCA_H -DMITSHM -DNODBBS
2058N/A
2058N/ALIB_CSRCS = libvtsSUNW${Dev}.c ${GFX_COMMON}/vts/gfx_vts.c tools.c \
2058N/A mapper.c memory.c chip.c ${DEV_CSRCS}
2058N/ALIB_OBJS = libvtsSUNW${Dev}.o gfx_vts.o tools.o mapper.o memory.o chip.o \
2058N/A ${DEV_OBJS}
2058N/A
2058N/A#
2058N/A# Build rules
2058N/A#
all: libvtsSUNW${Dev}.so.1
libvtsSUNW${Dev}.so.1: $(LIB_OBJS) mapfile
${CC} ${CFLAGS} -M mapfile -G -lXext -lX11 -lm $(LIB_OBJS) -o $@
gfx_vts.o: ${GFX_COMMON}/vts/gfx_vts.c $(HDRS)
${CC} ${CFLAGS} -c ${INCL} -Kpic -xregs=no%appl ${GFX_COMMON}/vts/gfx_vts.c -o $@
xfb_uselib64: ${GFX_COMMON}/vts/xfb_uselib.c $(HDRS)
${CC} ${CFLAGS} ${INCL} ${GFX_COMMON}/vts/xfb_uselib.c -ldl -lXext -lX11 -lm -L . -o $@
${Dev}_uselib64: xfb_uselib64
rm -f $@
ln -s xfb_uselib64 $@
%.o: %.c $(HDRS)
${CC} ${CFLAGS} -c ${INCL} -Kpic -xregs=no%appl -o $@ $<
clean:
rm -f ${Dev}_uselib64 xfb_uselib64 libvtsSUNW${Dev}.so.1 $(LIB_OBJS)
tidy:
rm -f *~
install: $(INSTALL_LIB_DIR)/libvtsSUNW${Dev}.so.1
$(INSTALL_LIB_DIR)/libvtsSUNW${Dev}.so.1: libvtsSUNW${Dev}.so.1
$(INSTALL) -m 0755 $? $@