Makefile revision 827
304N/A###############################################################################
304N/A#
304N/A# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
304N/A# Use is subject to license terms.
911N/A#
851N/A# Permission is hereby granted, free of charge, to any person obtaining a
304N/A# copy of this software and associated documentation files (the
304N/A# "Software"), to deal in the Software without restriction, including
304N/A# without limitation the rights to use, copy, modify, merge, publish,
304N/A# distribute, and/or sell copies of the Software, and to permit persons
304N/A# to whom the Software is furnished to do so, provided that the above
304N/A# copyright notice(s) and this permission notice appear in all copies of
304N/A# the Software and that both the above copyright notice(s) and this
304N/A# permission notice appear in supporting documentation.
304N/A#
304N/A# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
304N/A# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
304N/A# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
304N/A# OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
304N/A# HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
304N/A# INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
304N/A# FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
304N/A# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
304N/A# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
304N/A#
304N/A# Except as contained in this notice, the name of a copyright holder
304N/A# shall not be used in advertising or otherwise to promote the sale, use
304N/A# or other dealings in this Software without prior written authorization
304N/A# of the copyright holder.
304N/A#
304N/A#ident "@(#)Makefile 1.2 09/11/10 SMI"
304N/A#
304N/A
304N/A# Manual conversion of X11R6.9 xc/config/pswrap/Imakefile
304N/A
493N/A CC = cc
304N/A FRIENDSDEF = -DFRIENDSFILE='"<DPS/dpsfriends.h>"'
304N/A DEFINES = -DXENVIRONMENT
851N/A CPPFLAGS += $(DEFINES)
304N/A YACC = /usr/ccs/bin/yacc
911N/A YFLAGS = -d
911N/AEXTRA_LIBRARIES = -ll
911N/A
911N/ASRCS = main.c pswdict.c pswfile.c \
304N/A systemnames.c psw.c pswstring.c pswsemantics.c
304N/A
304N/AOBJS = main.o pswparser.o lexer.o pswdict.o pswfile.o \
304N/A systemnames.o psw.o pswstring.o pswsemantics.o
304N/A
304N/A# Inspired by automake 1.11 silent rules - hides details by default
493N/A# Run make V=1 to show details
493N/ADEFAULT_V = 0
304N/AV_CC = $(V_CC_$(V))
304N/AV_CC_ = $(V_CC_$(DEFAULT_V))
V_CC_0 = @echo " CC " $@;
V_YACC = $(V_YACC_$(V))
V_YACC_ = $(V_YACC_$(DEFAULT_V))
V_YACC_0 = @echo " YACC " $@;
all: pswrap
pswrap: $(OBJS)
$(V_CC)$(CC) -o $@ $(LDFLAGS) $(OBJS) $(EXTRA_LIBRARIES)
pswfile.o:
$(V_CC)$(CC) -c $(CFLAGS) $(CPPFLAGS) $(FRIENDSDEF) $*.c
.c.o:
$(V_CC)$(CC) $(CFLAGS) $(CPPFLAGS) -c $(OUTPUT_OPTION) $<
pswparser.h + pswparser.c : pswparser.y
$(V_YACC)$(YACC) $(YFLAGS) pswparser.y ; \
mv y.tab.c pswparser.c ; \
mv y.tab.h pswparser.h
install: pswrap
$(INSTALL) pswrap $(DESTDIR)$(bindir)/pswrap
clean:
${RM} lexer.c y.tab.h pswparser.c *.o pswrap
lexer.o: pswparser.h