Package: gaviotatb / 0.4-2

Makefile.diff Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
Index: gaviotatb/Makefile
===================================================================
--- gaviotatb.orig/Makefile	2015-01-20 23:54:08.032833467 -0500
+++ gaviotatb/Makefile	2015-01-20 23:54:36.845198761 -0500
@@ -10,7 +10,7 @@
 #DEFAULT_ARCHFLAGS = -m64
 DEFAULT_CFLAGS = -Wall -Wextra -fPIC $(INCLUDE) $(DEFAULT_DEFINE) \
 	$(DEFAULT_ARCHFLAGS)
-PREFIX = /usr/local
+PREFIX = /usr
 OPTFLAGS = -fast -msse -DNDEBUG
 DEBUGFLAGS = -O0 -g -DDEBUG
 PGO1FLAGS = $(OPTFLAGS) -fprofile-generate
@@ -30,8 +30,8 @@
 	compression/liblzf/lzf_c.c compression/liblzf/lzf_d.c
 OBJFILES := $(patsubst %.c,%.o,$(SRCFILES))
 PROFFILES := $(SRCFILES:.c=.gcno) $(SRCFILES:.c=.gcda)
-LIBNAME := libgtb.a
-SONAME :=libgtb.so
+LIBNAME := libgaviotatb.a
+SONAME :=libgaviotatb.so
 SOVERSION := 1.0.1
 SOMAJORVERSION := 1
 
@@ -54,8 +54,8 @@
 $(LIBNAME): $(OBJFILES)
 	$(AR) rcs $@ $(OBJFILES)
 
-$(SONAME): $(OBJFILES)   
-	$(CC) -shared $(OBJFILES) -Wl,-soname=$(SONAME).$(SOMAJORVERSION) -o $(SONAME).$(SOVERSION)
+$(SONAME): $(OBJFILES)
+	$(CC) -shared $(OBJFILES) -Wl,-soname=$(SONAME).$(SOMAJORVERSION) -o $(SONAME).$(SOVERSION) -lz -lpthread
 
 opt:
 	$(MAKE) $(LIBNAME) \
@@ -90,16 +90,20 @@
 		LDFLAGS='$(LDFLAGS) -fprofile-generate'
 
 clean:
-	$(RM) -f $(OBJFILES) $(LIBNAME) $(SONAME)
+	$(RM) -f $(OBJFILES) $(LIBNAME) $(SONAME).$(SOVERSION)
 
 pgo-clean:
 	$(RM) -f $(PROFFILES)
 
 install:
-	install -m 755 -o root -g root $(LIBNAME) $(SONAME).$(SOVERSION) $(PREFIX)/lib
-	ln -sf $(SONAME).$(SOMAJORVERSION) $(PREFIX)/lib/$(SONAME)
-	install -m 644 -o root -g root gtb-probe.h $(PREFIX)/include
-	ldconfig
+	mkdir -p $(DESTDIR)/$(PREFIX)/lib
+	install -m 755 -o root -g root $(LIBNAME) $(SONAME).$(SOVERSION) $(DESTDIR)/$(PREFIX)/lib
+	(cd $(DESTDIR)/$(PREFIX)/lib; \
+	ln -sf $(SONAME).$(SOVERSION) $(SONAME).$(SOMAJORVERSION); \
+	ln -sf $(SONAME).$(SOVERSION) $(SONAME);)
+	mkdir -p $(DESTDIR)/$(PREFIX)/include
+	install -m 644 -o root -g root gtb-probe.h $(DESTDIR)/$(PREFIX)/include
+	#ldconfig
 
 .depend:
 	$(CC) -MM $(DEFAULT_CFLAGS) $(SRCFILES) > $@
Index: gaviotatb/compression/wrap.c
===================================================================
--- gaviotatb.orig/compression/wrap.c	2015-01-20 23:54:08.032833467 -0500
+++ gaviotatb/compression/wrap.c	2015-01-20 23:54:08.028833417 -0500
@@ -42,6 +42,7 @@
 #endif
 
 #if defined(ZLIB)
+#define Z_SOLO
 #include "zlib.h"
 #endif