Makefile revision 881
98N/A###############################################################################
98N/A#
199N/A# libdps Makefile
98N/A#
1089N/A# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
98N/A# Use is subject to license terms.
98N/A#
919N/A# Permission is hereby granted, free of charge, to any person obtaining a
919N/A# copy of this software and associated documentation files (the
919N/A# "Software"), to deal in the Software without restriction, including
919N/A# without limitation the rights to use, copy, modify, merge, publish,
919N/A# distribute, and/or sell copies of the Software, and to permit persons
919N/A# to whom the Software is furnished to do so, provided that the above
919N/A# copyright notice(s) and this permission notice appear in all copies of
919N/A# the Software and that both the above copyright notice(s) and this
919N/A# permission notice appear in supporting documentation.
919N/A#
919N/A# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
919N/A# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
919N/A# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
919N/A# OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
919N/A# HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
919N/A# INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
919N/A# FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
98N/A# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
98N/A# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
98N/A#
98N/A# Except as contained in this notice, the name of a copyright holder
493N/A# shall not be used in advertising or otherwise to promote the sale, use
98N/A# or other dealings in this Software without prior written authorization
98N/A# of the copyright holder.
1089N/A#
98N/A#ident "@(#)Makefile 1.3 09/11/19 SMI"
911N/A#
1089N/A
1089N/A REQUIREDLIBS = -lX11 -lsocket -lnsl -lc
911N/A
98N/A# The Client Library uses definitions just like Xlib for network
1089N/A# capabilities, such as TCPCONN, UNIXCONN, and DNETCONN. See
1089N/A# csconndi.c and csopendi.c
1089N/A
1089N/A# The connection code should be rewritten to use xtrans. The STREAMSCONN
1089N/A# code here needs work. For now force ConnectionFlags to be
1124N/A# -DTCPCONN -DUNIXCONN
1124N/A
98N/A CC = cc
98N/A DEFINES = -DXDPS -DCSDPS -DTCPCONN -DUNIXCONN -DSVR4
98N/A DPSCPPFLAGS = $(DEFINES) -I ../include
493N/A DPSCFLAGS = -Kpic
98N/A SHLIBLDFLAGS = -G -z defs $(LDFLAGS) -R $(libdir)
1097N/A CAT = cat
1097N/A SED = sed
1097N/A AWK = awk
1097N/A SORT = sort
1097N/A PSWRAP = ../pswrap/pswrap
1097N/A
1097N/ACOMMONOBJECTFILES = \
1097N/A dpsclient.o\
1097N/A dpsprintf.o\
1097N/A dpsexcept.o\
1097N/A dpsdict.o\
1097N/A dpsabbrev.o
1097N/A
1097N/ACOMMONSOURCEFILES = \
1097N/A dpsclient.c\
1097N/A dpsprintf.c\
1097N/A dpsexcept.c\
1097N/A dpsdict.c\
1097N/A dpsabbrev.c
1097N/A
1097N/AXOBJECTFILES = \
705N/A dpsXclient.o\
705N/A dpssysnames.o\
705N/A dpsXpriv.o\
705N/A XDPS.o\
606N/A dpsXcmu.o
965N/A
965N/A# dpsXtdisp.o\ - wasn't included in Solaris libdps for some reason
98N/A
965N/AXSOURCEFILES = \
493N/A dpsXclient.c\
1097N/A dpssysnames.c\
1097N/A dpsXpriv.c\
1097N/A XDPS.c\
98N/A dpsXcmu.c
1089N/A
1089N/A# dpsXtdisp.c\ - wasn't included in Solaris libdps for some reason
98N/A
199N/AXCSDPSOBJECTFILES = \
199N/A cslibext.o\
493N/A csopendi.o\
493N/A csconndi.o\
493N/A csstartNX.o\
98N/A csfindNX.o\
910N/A cslibint.o
98N/A
1097N/AXCSDPSSOURCEFILES = \
1097N/A cslibext.c\
1097N/A csopendi.c\
1097N/A csconndi.c\
csstartNX.c\
csfindNX.c\
cslibint.c
DPSOPSOBJECTS = \
dpsclrops.o\
dpsctrlops.o\
dpsctxtops.o\
dpsdataops.o\
dpsfontops.o\
dpsgsttops.o\
dpsioops.o\
dpsmathops.o\
dpsmtrxops.o\
dpsmiscops.o\
dpspntops.o\
dpspathops.o\
dpssysops.o\
dpswinops.o\
dpsopstack.o\
dpsXops.o\
dpsl2ops.o
PSOPSOBJECTS = \
psclrops.o\
psctrlops.o\
psctxtops.o\
psdataops.o\
psfontops.o\
psgsttops.o\
psioops.o\
psmathops.o\
psmtrxops.o\
psmiscops.o\
pspntops.o\
pspathops.o\
pssysops.o\
pswinops.o\
psopstack.o\
psXops.o\
psl2ops.o
DPSOPSHEADERFILES = \
dpsclrops.h\
dpsctrlops.h\
dpsctxtops.h\
dpsdataops.h\
dpsfontops.h\
dpsgsttops.h\
dpsioops.h\
dpsmathops.h\
dpsmtrxops.h\
dpsmiscops.h\
dpsopstack.h\
dpspntops.h\
dpspathops.h\
dpssysops.h\
dpswinops.h\
dpsXops.h\
dpsl2ops.h
PSOPSHEADERFILES = \
psclrops.h\
psctrlops.h\
psctxtops.h\
psdataops.h\
psfontops.h\
psgsttops.h\
psioops.h\
psmathops.h\
psmtrxops.h\
psmiscops.h\
pspntops.h\
pspathops.h\
pssysops.h\
pswinops.h\
psopstack.h\
psXops.h\
psl2ops.h
DPSOPSCFILES = \
dpsclrops.c\
dpsctrlops.c\
dpsctxtops.c\
dpsdataops.c\
dpsfontops.c\
dpsgsttops.c\
dpsioops.c\
dpsmathops.c\
dpsmtrxops.c\
dpsmiscops.c\
dpsopstack.c\
dpspntops.c\
dpspathops.c\
dpssysops.c\
dpswinops.c\
dpsXops.c\
dpsl2ops.c
PSOPSCFILES = \
psclrops.c\
psctrlops.c\
psctxtops.c\
psdataops.c\
psfontops.c\
psgsttops.c\
psioops.c\
psmathops.c\
psmtrxops.c\
psmiscops.c\
pspntops.c\
pspathops.c\
pssysops.c\
pswinops.c\
psopstack.c\
psXops.c\
psl2ops.c
HEADERS = psops.h dpsops.h
all:: $(HEADERS)
includes:: $(DPSOPSCFILES) $(PSOPSCFILES) $(HEADERS)
$(DPSOPSCFILES) $(PSOPSCFILES): $(PSWRAP)
SRCS = \
${COMMONSOURCEFILES} \
${XSOURCEFILES} \
${XCSDPSSOURCEFILES} \
${DPSOPSCFILES} \
${PSOPSCFILES}
OBJS = \
${COMMONOBJECTFILES} \
${XOBJECTFILES} \
${XCSDPSOBJECTFILES} \
${DPSOPSOBJECTS} \
${PSOPSOBJECTS}
DERIVED_FILES = $(DPSOPSHEADERFILES) $(PSOPSHEADERFILES) \
$(DPSOPSCFILES) $(PSOPSCFILES)
# Inspired by automake 1.11 silent rules - hides details by default
# Run make V=1 to show details
DEFAULT_V = 0
V_CC = $(V_CC_$(V))
V_CC_ = $(V_CC_$(DEFAULT_V))
V_CC_0 = @echo " CC " $@;
V_PSWRAP = $(V_PSWRAP_$(V))
V_PSWRAP_ = $(V_PSWRAP_$(DEFAULT_V))
V_PSWRAP_0 = @echo " PSWRAP" $@;
V_GEN = $(V_GEN_$(V))
V_GEN_ = $(V_GEN_$(DEFAULT_V))
V_GEN_0 = @echo " GEN " $@;
.SUFFIXES: .psw
.psw.c :
$(V_PSWRAP)$(PSWRAP) -a -o $*.c -h $*.h $<
.psw.h :
$(V_PSWRAP)$(PSWRAP) -a -h $*.h $< > /dev/null
.c.o:
$(V_CC)$(CC) $(DPSCFLAGS) $(CFLAGS) $(DPSCPPFLAGS) $(CPPFLAGS) -c $(OUTPUT_OPTION) $<
includes :: $(HEADERS)
depend :: $(DPSOPSCFILES) $(PSOPSCFILES)
psops.h : $(PSOPSHEADERFILES)
$(V_GEN) ${RM} $@ ; \
${CAT} $(PSOPSHEADERFILES) |\
${SED} -e '/^$$/D' -e '/#/D' -e '/^\//D'\
-e '/^ gener/D' -e '/^.\//D' |\
${SORT} > .sort ; \
${AWK} '/;/ {print; printf("\n");}' .sort > .ttt ; \
${CAT} psname.txt header.txt psifdef.txt .ttt psendif.txt > psops.h ; \
${RM} .sort .ttt .attt
dpsops.h : psops.h $(DPSOPSHEADERFILES)
$(V_GEN) ${RM} $@ ; \
${CAT} $(DPSOPSHEADERFILES) |\
${SED} -e '/^$$/D' -e '/#/D' -e '/^\//D'\
-e '/^ gener/D' -e '/^.\//D' |\
${SORT} > .sort ; \
${AWK} '/;/ {print; printf("\n");}' .sort > .ttt ; \
${CAT} dpsname.txt header.txt dpsifdef.txt .ttt dpsendif.txt > dpsops.h ; \
${RM} .sort .ttt .attt
all:: ../include/DPS/psops.h ../include/DPS/dpsops.h
$(OBJS): $(HEADERS) ../include/DPS/psops.h ../include/DPS/dpsops.h
../include/DPS/psops.h: psops.h
-${RM} $@
ln -s ../../libdps/psops.h $@
../include/DPS/dpsops.h: dpsops.h
-${RM} $@
ln -s ../../libdps/dpsops.h $@
all:: $(OBJS) libdps.so.5 libdps.so
MAPFILE = mapfile
libdps.so.5: $(OBJS) $(EXTRASHAREDOBJS) $(MAPFILE)
$(V_CC)$(CC) $(CDEBUGFLAGS) -o $@ -h $@ $(SHLIBLDFLAGS) -M $(MAPFILE) $(OBJS) $(EXTRASHAREDOBJS) $(REQUIREDLIBS)
libdps.so: libdps.so.5
-${RM} libdps.so
ln -s libdps.so.5 libdps.so
install: all
$(INSTALL) libdps.so.5 $(DESTDIR)$(libdir)/libdps.so.5
clean ::
${RM} $(DERIVED_FILES) .sort .ttt .att psops.h dpsops.h *%