Home | History | Annotate | Download | only in lftp
      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 
     22 #
     23 # Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
     24 # Use is subject to license terms.
     25 #
     26 #pragma ident	"@(#)Makefile.sfw	1.5	09/07/31 SMI"
     27 #
     28 
     29 include ../Makefile.cmd
     30 
     31 VER =		$(COMPONENT_NAME:sh)-$(COMPONENT_VERSION:sh)
     32 TARBALL =	$(VER).tar.bz2
     33 PATCHES:sh =	echo Patches/*.patch
     34 
     35 TARGET_ENV +=   CC="$(CC)"
     36 TARGET_ENV +=   CXX="$(CCC)"
     37 TARGET_ENV +=   PATH="$(SFW_PATH)"
     38 TARGET_ENV +=   CFLAGS="$(CFLAGS) -xstrconst"
     39 TARGET_ENV +=   LDFLAGS="-L$(ROOT)/usr/lib -norunpath"
     40 TARGET_ENV +=   LD_OPTIONS="-M $(SRC)/cmd/mapfile_noexstk"
     41 TARGET_ENV +=   MAKE="$(CCSMAKE)"
     42 TARGET_ENV +=   INSTALL="$(INSTALL_PROTO)"
     43 TARGET_ENV +=   localedir="$(CFGLOCALE)"
     44 
     45 all: $(VER)/config.status
     46 	(cd $(VER); env - $(CCSMAKE) all)
     47 
     48 install: install-protofix
     49 
     50 install-target: $(VER)/config.status
     51 	(cd $(VER); env - $(CCSMAKE) install DESTDIR=$(ROOT) MANSCRIPT=$(MANSCRIPT))
     52 	$(RM) -r $(ROOTLIB)/liblftp* $(ROOTLIB)/lftp
     53 	# lftp.1 is not recognized as 'roff' file type and therefore $(MANSCRIPT) 
     54 	# is not used by $(INSTALL_PROTO). It must be done manually.
     55 	$(SED) -f $(MANSCRIPT) $(VER)/doc/lftp.1 > $(ROOTMAN1)/lftp.1
     56 
     57 install-protofix: install-target
     58 	for pkg in $(COMPONENT_PACKAGES:sh) ; do \
     59 		$(SRC)/tools/protofix --pkg $$pkg --perm ; \
     60 	done
     61 
     62 $(VER)/config.status: $(VER)/.patched
     63 	(cd $(VER) ; env - ./configure $(CONFIGURE_OPTIONS) $(TARGET_ENV))
     64 
     65 clean:
     66 	-rm -rf $(VER)
     67 
     68 include ../Makefile.targ
     69