• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1From 70218c0c89b399fdc6febea92aae5dcc6ad32f56 Mon Sep 17 00:00:00 2001
2From: lvying <lvying6@huawei.com>
3Date: Sat, 19 Oct 2019 13:07:28 +0800
4Subject: [PATCH 1/2] add compile option
5
6Signed-off-by: lvying <lvying6@huawei.com>
7---
8 Makefile           | 4 ----
9 Makefile-libbz2_so | 5 ++---
10 2 files changed, 2 insertions(+), 7 deletions(-)
11
12diff --git a/Makefile b/Makefile
13index f8a1772..69ea7b2 100644
14--- a/Makefile
15+++ b/Makefile
16@@ -18,10 +18,6 @@ SHELL=/bin/sh
17 CC=gcc
18 AR=ar
19 RANLIB=ranlib
20-LDFLAGS=
21-
22-BIGFILES=-D_FILE_OFFSET_BITS=64
23-CFLAGS=-Wall -Winline -O2 -g $(BIGFILES)
24
25 # Where you want it installed when you do 'make install'
26 PREFIX=/usr/local
27diff --git a/Makefile-libbz2_so b/Makefile-libbz2_so
28index fb0f230..1eaf26a 100644
29--- a/Makefile-libbz2_so
30+++ b/Makefile-libbz2_so
31@@ -24,7 +24,6 @@
32 SHELL=/bin/sh
33 CC=gcc
34 BIGFILES=-D_FILE_OFFSET_BITS=64
35-CFLAGS=-fpic -fPIC -Wall -Winline -O2 -g $(BIGFILES)
36
37 OBJS= blocksort.o  \
38       huffman.o    \
39@@ -35,8 +34,8 @@ OBJS= blocksort.o  \
40       bzlib.o
41
42 all: $(OBJS)
43-	$(CC) -shared -Wl,-soname -Wl,libbz2.so.1.0 -o libbz2.so.1.0.8 $(OBJS)
44-	$(CC) $(CFLAGS) -o bzip2-shared bzip2.c libbz2.so.1.0.8
45+	$(CC) $(CFLAGS) $(LDFLAGS) -shared -Wl,-soname -Wl,libbz2.so.1 -o libbz2.so.1.0.8 $(OBJS)
46+	$(CC) $(CFLAGS) $(LDFLAGS) -o bzip2-shared bzip2.c libbz2.so.1.0.8
47 	rm -f libbz2.so.1.0
48 	ln -s libbz2.so.1.0.8 libbz2.so.1.0
49
50--
511.8.3.1
52
53