53 lines
1.4 KiB
Diff
53 lines
1.4 KiB
Diff
|
|
From 70218c0c89b399fdc6febea92aae5dcc6ad32f56 Mon Sep 17 00:00:00 2001
|
||
|
|
From: lvying <lvying6@huawei.com>
|
||
|
|
Date: Sat, 19 Oct 2019 13:07:28 +0800
|
||
|
|
Subject: [PATCH 1/2] add compile option
|
||
|
|
|
||
|
|
Signed-off-by: lvying <lvying6@huawei.com>
|
||
|
|
---
|
||
|
|
Makefile | 4 ----
|
||
|
|
Makefile-libbz2_so | 5 ++---
|
||
|
|
2 files changed, 2 insertions(+), 7 deletions(-)
|
||
|
|
|
||
|
|
diff --git a/Makefile b/Makefile
|
||
|
|
index f8a1772..69ea7b2 100644
|
||
|
|
--- a/Makefile
|
||
|
|
+++ b/Makefile
|
||
|
|
@@ -18,10 +18,6 @@ SHELL=/bin/sh
|
||
|
|
CC=gcc
|
||
|
|
AR=ar
|
||
|
|
RANLIB=ranlib
|
||
|
|
-LDFLAGS=
|
||
|
|
-
|
||
|
|
-BIGFILES=-D_FILE_OFFSET_BITS=64
|
||
|
|
-CFLAGS=-Wall -Winline -O2 -g $(BIGFILES)
|
||
|
|
|
||
|
|
# Where you want it installed when you do 'make install'
|
||
|
|
PREFIX=/usr/local
|
||
|
|
diff --git a/Makefile-libbz2_so b/Makefile-libbz2_so
|
||
|
|
index fb0f230..1eaf26a 100644
|
||
|
|
--- a/Makefile-libbz2_so
|
||
|
|
+++ b/Makefile-libbz2_so
|
||
|
|
@@ -24,7 +24,6 @@
|
||
|
|
SHELL=/bin/sh
|
||
|
|
CC=gcc
|
||
|
|
BIGFILES=-D_FILE_OFFSET_BITS=64
|
||
|
|
-CFLAGS=-fpic -fPIC -Wall -Winline -O2 -g $(BIGFILES)
|
||
|
|
|
||
|
|
OBJS= blocksort.o \
|
||
|
|
huffman.o \
|
||
|
|
@@ -35,8 +34,8 @@ OBJS= blocksort.o \
|
||
|
|
bzlib.o
|
||
|
|
|
||
|
|
all: $(OBJS)
|
||
|
|
- $(CC) -shared -Wl,-soname -Wl,libbz2.so.1.0 -o libbz2.so.1.0.8 $(OBJS)
|
||
|
|
- $(CC) $(CFLAGS) -o bzip2-shared bzip2.c libbz2.so.1.0.8
|
||
|
|
+ $(CC) $(CFLAGS) $(LDFLAGS) -shared -Wl,-soname -Wl,libbz2.so.1 -o libbz2.so.1.0.8 $(OBJS)
|
||
|
|
+ $(CC) $(CFLAGS) $(LDFLAGS) -o bzip2-shared bzip2.c libbz2.so.1.0.8
|
||
|
|
rm -f libbz2.so.1.0
|
||
|
|
ln -s libbz2.so.1.0.8 libbz2.so.1.0
|
||
|
|
|
||
|
|
--
|
||
|
|
1.8.3.1
|
||
|
|
|