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 2007 Sun Microsystems, Inc. All rights reserved. 23 # Use is subject to license terms. 24 # 25 #ident "@(#)makefile.build.64 1.5 07/04/02 SMI" 26 # 27 28 include $(SRC)/cmd/Makefile.cmd 29 30 CFLAGS64 += -KPIC -D_FILE_OFFSET_BITS=64 31 32 BLOBJ= blocksort.o 33 34 OBJS= \ 35 huffman.o \ 36 crctable.o \ 37 randtable.o \ 38 compress.o \ 39 decompress.o \ 40 bzlib.o \ 41 oldapi.o 42 43 BZOBJS= \ 44 bzip2.o \ 45 bzip2recover.o 46 47 all: libbz2.so .WAIT bzip2 bzip2recover 48 49 bzip2: libbz2.so bzip2.o 50 $(CC64) $(CFLAGS64) -o bzip2 bzip2.o -L. -lbz2 51 52 bzip2recover: bzip2recover.o 53 $(CC64) $(CFLAGS64) -o bzip2recover bzip2recover.o 54 55 libbz2.so: $(BLOBJ) $(OBJS) 56 rm -f libbz2.so libbz2.so.1 57 $(CC64) $(CFLAGS64) $(XREGSFLAG64) -G -h libbz2.so.1 -o libbz2.so.1 \ 58 -z defs -z text -zcombreloc $(BLOBJ) $(OBJS) -M ../mapfile -L. \ 59 -L$(ROOT)/usr/lib -lc 60 ln -s libbz2.so.1 libbz2.so 61 62 test: bzip2 63 @cat words1 64 env LD_LIBRARY_PATH=`pwd` ./bzip2 -1 < sample1.ref > sample1.rb2 65 env LD_LIBRARY_PATH=`pwd` ./bzip2 -2 < sample2.ref > sample2.rb2 66 env LD_LIBRARY_PATH=`pwd` ./bzip2 -3 < sample3.ref > sample3.rb2 67 env LD_LIBRARY_PATH=`pwd` ./bzip2 -d < sample1.bz2 > sample1.tst 68 env LD_LIBRARY_PATH=`pwd` ./bzip2 -d < sample2.bz2 > sample2.tst 69 env LD_LIBRARY_PATH=`pwd` ./bzip2 -ds < sample3.bz2 > sample3.tst 70 cmp sample1.bz2 sample1.rb2 71 cmp sample2.bz2 sample2.rb2 72 cmp sample3.bz2 sample3.rb2 73 cmp sample1.tst sample1.ref 74 cmp sample2.tst sample2.ref 75 cmp sample3.tst sample3.ref 76 @cat words3 77 78 blocksort.o: blocksort.c 79 @cat words0 80 $(CC64) $(CFLAGS64) $(XREGSFLAG64) -c blocksort.c 81 82 $(OBJS) $(BZOBJS): 83 $(CC64) $(CFLAGS64) $(XREGSFLAG64) -c $< 84