Home | History | Annotate | Download | only in links
      1 #
      2 # CDDL HEADER START
      3 #
      4 # The contents of this file are subject to the terms of the
      5 # Common Development and Distribution License (the "License").
      6 # You may not use this file except in compliance with the License.
      7 #
      8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
      9 # or http://www.opensolaris.org/os/licensing.
     10 # See the License for the specific language governing permissions
     11 # and limitations under the License.
     12 #
     13 # When distributing Covered Code, include this CDDL HEADER in each
     14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
     15 # If applicable, add the following below this CDDL HEADER, with the
     16 # fields enclosed by brackets "[]" replaced with your own identifying
     17 # information: Portions Copyright [yyyy] [name of copyright owner]
     18 #
     19 # CDDL HEADER END
     20 #
     21 # Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
     22 # Use is subject to license terms.
     23 #
     24 #pragma ident	"@(#)Makefile.sfw	1.1	08/06/05 SMI"
     25 #
     26 
     27 VER=links-1.00
     28 
     29 include ../Makefile.cmd
     30 
     31 # Using some defaults from Makefile.master...
     32 #
     33 XSTRCONST = -xstrconst
     34 ERROFF = -erroff
     35 CFLAGS += $(XSTRCONST)
     36 CFLAGS += $(ERROFF)
     37 
     38 all: $(VER)/config.status
     39 	(cd $(VER); env \
     40 	    CC=$(CC) \
     41 	    "CFLAGS=$(CFLAGS)" \
     42 	    LD_OPTIONS="-M $(SRC)/cmd/mapfile_noexstk" \
     43 	    PATH=$(SFW_PATH) \
     44 	    MAKE=$(CCSMAKE) $(CCSMAKE))
     45 	@find . -name core -exec rm -f {} \;
     46 
     47 install: all
     48 	$(SH) ./install-sfw
     49 
     50 $(VER)/config.status: $(VER)/configure
     51 	(cd $(VER); env \
     52 	    CC=$(CC) \
     53 	    PATH=$(SFW_PATH) \
     54 	    MAKE=$(CCSMAKE) \
     55 	    CFLAGS="-Dinline" \
     56 	./configure $(CONFIGURE_OPTIONS))
     57 
     58 $(VER)/configure: $(VER).tar.gz
     59 	$(GTAR) zxpf $(VER).tar.gz --no-same-owner
     60 	touch $(VER)/configure
     61 	find $(VER) -type d -exec /usr/bin/chmod 755 "{}" \;
     62 	find $(VER) -type f -exec /usr/bin/chmod ugo+r "{}" \;
     63 
     64 clean:
     65 	-rm -rf $(VER)
     66 
     67 include ../Makefile.targ
     68 
     69 FRC:
     70