open-src/lib/DPS/sun-src/pswrap/Makefile
changeset 824 b194b3fada3c
child 827 3c2201c40661
equal deleted inserted replaced
823:b2299c1935d5 824:b194b3fada3c
       
     1 ###############################################################################
       
     2 #
       
     3 # Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
       
     4 # Use is subject to license terms.
       
     5 #
       
     6 # Permission is hereby granted, free of charge, to any person obtaining a
       
     7 # copy of this software and associated documentation files (the
       
     8 # "Software"), to deal in the Software without restriction, including
       
     9 # without limitation the rights to use, copy, modify, merge, publish,
       
    10 # distribute, and/or sell copies of the Software, and to permit persons
       
    11 # to whom the Software is furnished to do so, provided that the above
       
    12 # copyright notice(s) and this permission notice appear in all copies of
       
    13 # the Software and that both the above copyright notice(s) and this
       
    14 # permission notice appear in supporting documentation.
       
    15 # 
       
    16 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
       
    17 # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
       
    18 # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
       
    19 # OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
       
    20 # HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
       
    21 # INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
       
    22 # FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
       
    23 # NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
       
    24 # WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
       
    25 # 
       
    26 # Except as contained in this notice, the name of a copyright holder
       
    27 # shall not be used in advertising or otherwise to promote the sale, use
       
    28 # or other dealings in this Software without prior written authorization
       
    29 # of the copyright holder.
       
    30 #
       
    31 #ident	"@(#)Makefile	1.1	09/11/09 SMI"
       
    32 #
       
    33 
       
    34 # Manual conversion of X11R6.9 xc/config/pswrap/Imakefile
       
    35 
       
    36              CC = cc
       
    37      FRIENDSDEF = -DFRIENDSFILE='"<DPS/dpsfriends.h>"'
       
    38         DEFINES = -DXENVIRONMENT
       
    39       CPPFLAGS += $(DEFINES)
       
    40            YACC = /usr/ccs/bin/yacc
       
    41          YFLAGS = -d
       
    42 EXTRA_LIBRARIES = -ll
       
    43 
       
    44 SRCS = main.c pswdict.c pswfile.c \
       
    45 	systemnames.c psw.c pswstring.c pswsemantics.c
       
    46 
       
    47 OBJS = main.o pswparser.o lexer.o pswdict.o pswfile.o \
       
    48 	systemnames.o psw.o pswstring.o pswsemantics.o
       
    49 
       
    50 # Inspired by automake 1.11 silent rules - hides details by default
       
    51 # Run make V=1 to show details
       
    52 DEFAULT_V  = 0
       
    53 V_CC       = $(V_CC_$(V))
       
    54 V_CC_      = $(V_CC_$(DEFAULT_V))
       
    55 V_CC_0     = @echo "  CC    " $@;
       
    56 V_YACC     = $(V_YACC_$(V))
       
    57 V_YACC_    = $(V_YACC_$(DEFAULT_V))
       
    58 V_YACC_0   = @echo "  YACC  " $@;
       
    59 
       
    60 all: pswrap
       
    61 
       
    62 pswrap: $(OBJS)
       
    63 	$(V_CC)$(CC) -o $@ $(LDFLAGS) $(OBJS) $(EXTRA_LIBRARIES)
       
    64 
       
    65 pswfile.o:
       
    66 	$(V_CC)$(CC) -c $(CFLAGS) $(CPPFLAGS) $(FRIENDSDEF) $*.c
       
    67 
       
    68 .c.o:
       
    69 	$(V_CC)$(CC) $(CFLAGS) $(CPPFLAGS) -c $(OUTPUT_OPTION) $<
       
    70 
       
    71 pswparse.h + pswparser.c : pswparser.y
       
    72 	$(V_YACC)$(YACC) $(YFLAGS) pswparser.y ; \
       
    73 	mv y.tab.c pswparser.c ; \
       
    74 	mv y.tab.h pswparser.h
       
    75 
       
    76 install: pswrap
       
    77 	$(INSTALL) pswrap $(DESTDIR)$(bindir)/pswrap
       
    78 
       
    79 clean:
       
    80 	${RM} lexer.c y.tab.h pswparser.c *.o pswrap
       
    81