1 # 2 # 3 # CDDL HEADER START 4 # 5 # The contents of this file are subject to the terms of the 6 # Common Development and Distribution License (the "License"). 7 # You may not use this file except in compliance with the License. 8 # 9 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10 # or http://www.opensolaris.org/os/licensing. 11 # See the License for the specific language governing permissions 12 # and limitations under the License. 13 # 14 # When distributing Covered Code, include this CDDL HEADER in each 15 # file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16 # If applicable, add the following below this CDDL HEADER, with the 17 # fields enclosed by brackets "[]" replaced with your own identifying 18 # information: Portions Copyright [yyyy] [name of copyright owner] 19 # 20 # CDDL HEADER END 21 # 22 # Copyright 2009 Sun Microsystems, Inc. All rights reserved. 23 # Use is subject to license terms. 24 # 25 #ident "@(#)Makefile.sfw 1.16 09/04/13 SMI" 26 27 VER=ImageMagick-6.3.4 28 VER64=$(VER)-64 29 VERS=-2 30 31 include ../Makefile.cmd 32 33 SFW_PATH="$(SPRO_VROOT)/bin:/usr/sfw/bin:$(PATH)" 34 35 CPPFLAGS += -I$(ROOT)/usr/include/libxml2 36 CPPFLAGS += -I$(ROOT)/usr/sfw/include/freetype2 37 CPPFLAGS += -I/usr/sfw/include 38 CPPFLAGS += -I/usr/include/libxml2 39 CPPFLAGS += -I/usr/sfw/include/freetype2 40 CPPFLAGS += -I/usr/X/include/X11 41 LDFLAGS += -L/usr/X/lib -R/usr/X/lib 42 #LDFLAGS="-L$(ROOT)/usr/lib/64 -L$(ROOT)/usr/sfw/lib/64 -R$(ROOT)/usr/sfw/lib/64" \ 43 44 all: all-32 all-64 45 46 all-32: $(VER)/config.status 47 $(INCREFIXUP) $(VER) 48 (cd $(VER); env \ 49 "CC=$(CC)" \ 50 "CXX=$(CCC)" \ 51 PATH=$(SFW_PATH) \ 52 CFLAGS="${CFLAGS}" \ 53 CXXFLAGS="-xO3" \ 54 CPPFLAGS="$(CPPFLAGS)" \ 55 LDFLAGS="$(LDFLAGS)" \ 56 MAKE=$(CCSMAKE) $(CCSMAKE) ) 57 @find . -name core -exec rm -f {} \; 58 59 all-64: $(VER64)/config.status 60 (cd $(VER64); env \ 61 "CC=$(CC)" \ 62 "CXX=$(CCC)" \ 63 PATH=$(SFW_PATH) \ 64 CFLAGS="${CFLAGS64}" \ 65 CXXFLAGS="$(CCFLAGS64) -xO3" \ 66 CPPFLAGS="$(CPPFLAGS)" \ 67 LDFLAGS="$(LDFLAGS64)" \ 68 MAKE=$(CCSMAKE) $(CCSMAKE) ) 69 @find . -name core -exec rm -f {} \; 70 71 # Leave in symlinks for compatibility 72 COMPAT= Magick++-config Magick-config animate composite conjure convert \ 73 display identify import mogrify montage 74 75 COMPATLINKS = $(COMPAT:%=$(ROOTSFWBIN)/%) 76 $(COMPATLINKS): 77 $(RM) $@; $(SYMLINK) ../../bin/$(@F) $@ 78 79 install-32: install-64 all-32 80 # install the bits in the proto area 81 cd $(VER); env SRC=$(SRC) DESTDIR=$(ROOT) \ 82 MANSCRIPT=../sunman-stability \ 83 MAKE=$(CCSMAKE) $(CCSMAKE) install 84 # clean up the turds: libtool .la files, .packlists, ... 85 $(RM) $(ROOT)/usr/lib/$(VER)/modules-Q16/filters/*.la \ 86 $(ROOT)/usr/lib/$(VER)/modules-Q16/coders/*.la \ 87 $(ROOT)/usr/lib/libMagick.la $(ROOT)/usr/lib/libWand.la \ 88 $(ROOT)/usr/lib/libMagick++.la 89 $(RM) $(ROOT)/usr/perl5/5.8.4/lib/`/bin/arch`-solaris-64int/perllocal.pod 90 - /bin/rmdir $(ROOT)/usr/perl5/5.8.4/lib/`/bin/arch`-solaris-64int 91 $(RM) $(ROOT)/usr/perl5/site_perl/5.8.4/`/bin/arch`-solaris-64int/auto/Image/Magick/.packlist 92 93 install-64: all-64 94 # install the bits in the proto area 95 cd $(VER64); env SRC=$(SRC) DESTDIR=$(ROOT) \ 96 MANSCRIPT=../sunman-stability \ 97 MAKE=$(CCSMAKE) $(CCSMAKE) install 98 # clean up the turds: libtool .la files, .packlists, ... 99 $(RM) $(ROOT)/usr/lib/64/$(VER)/modules-Q16/filters/*.la \ 100 $(ROOT)/usr/lib/64/$(VER)/modules-Q16/coders/*.la \ 101 $(ROOT)/usr/lib/64/libMagick.la $(ROOT)/usr/lib/64/libWand.la \ 102 $(ROOT)/usr/lib/64/libMagick++.la 103 104 install: install-32 install-64 $(COMPATLINKS) 105 # fix the proto area 106 $(SRC)/tools/protofix --pkg SUNWimagick --perm 107 108 $(VER)/config.status: $(VER)/configure 109 (cd $(VER); env \ 110 "CC=$(CC)" \ 111 "CXX=$(CCC)" \ 112 PATH=$(SFW_PATH) \ 113 INSTALL="$(SRC)/tools/install-proto" \ 114 CFLAGS="${CFLAGS}" \ 115 CXXFLAGS="-xO3" \ 116 CPPFLAGS="-I${ROOT}/usr/sfw/include -I${ROOT}/usr/include/libxml2 -I${ROOT}/usr/sfw/include/freetype2 -I/usr/sfw/include -I/usr/include/libxml2 -I/usr/sfw/include/freetype2 -I/usr/X/include/X11" \ 117 LDFLAGS="-L${ROOT}/usr/lib -L${ROOT}/usr/sfw/lib -L/usr/sfw/lib -L/usr/X/lib -R/usr/sfw/lib:/usr/X/lib" \ 118 MAKE=$(CCSMAKE) \ 119 ./configure \ 120 --prefix=/usr \ 121 --with-modules \ 122 --enable-shared=yes \ 123 --enable-static=no \ 124 --without-gvc \ 125 ) 126 127 $(VER64)/config.status: $(VER64)/configure 128 (cd $(VER64); env \ 129 "CC=$(CC)" \ 130 "CXX=$(CCC)" \ 131 PATH=$(SFW_PATH) \ 132 INSTALL="$(SRC)/tools/install-proto" \ 133 CFLAGS="${CFLAGS64}" \ 134 CXXFLAGS="$(CCFLAGS64) -xO3" \ 135 MAKE=$(CCSMAKE) \ 136 ./configure \ 137 --prefix=/usr \ 138 --libdir=/usr/lib/64 \ 139 --with-modules \ 140 --enable-shared=yes \ 141 --enable-static=no \ 142 --without-gvc \ 143 --without-perl \ 144 ) 145 146 # 147 # Patches: 148 # 1. la.patch - So it uses .so files instead of .la files 149 # 150 151 $(VER)/configure: $(VER)$(VERS).tar.bz2 152 /usr/bin/bzip2 -dc $(VER)$(VERS).tar.bz2 | /usr/bin/tar oxpf - 153 /usr/bin/gpatch -p0 < la.patch 154 touch $(VER)/configure 155 156 $(VER64)/configure: $(VER)$(VERS).tar.bz2 157 -$(RM) -r tmp ; mkdir tmp 158 (cd tmp ; \ 159 /usr/bin/bzip2 -dc ../$(VER)$(VERS).tar.bz2 | /usr/bin/tar oxpf - ; \ 160 /usr/bin/gpatch -p0 < ../la.patch) 161 -$(RM) -r $(VER64) ; mv tmp/$(VER) $(VER64) 162 touch $(VER64)/configure 163 164 clean: 165 -$(RM) -r $(VER) $(VER64) 166 167 include ../Makefile.targ 168 169 FRC: 170