summaryrefslogtreecommitdiff
path: root/math/dieharder/patches/patch-ac
blob: b64d90ab516d86752839fdaa18cc37d58560c7f0 (plain)
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
$NetBSD: patch-ac,v 1.1.1.1 2007/09/13 10:07:36 gson Exp $

--- dieharder/Makefile.am.orig	2007-05-22 03:34:27.000000000 +0300
+++ dieharder/Makefile.am
@@ -46,7 +46,6 @@ SRCINCLUDES = $(shell ls *.h  2>&1 | sed
 # see how to force a consistent build when working on the UI
 # and library at the same time.  Maybe with particular make targets...
 LIBINCLUDES = $(shell ls ../include/dieharder/*.h  2>&1 | sed -e "/\/bin\/ls:/d")
-PROGLIB_SONAME = $(LIBDIR)/libdieharder.so.$(VERSION)
 
 SOURCES = $(LIBSOURCES) $(SRCSOURCES)
 INCLUDES = $(LIBINCLUDES) $(SRCINCLUDES)
@@ -63,11 +62,8 @@ CC = gcc
 # Compile flags (use fairly standard -O3 as default)
 CFLAGS = -O3 -I ../include $(DEFINES) 
 
-# Linker flags.
-LDFLAGS =
-
 # Libraries
-LIBS = -L ../libdieharder -ldieharder -lgsl -lgslcblas -lm
+LIBS = ../libdieharder/libdieharder.la -lgsl -lgslcblas -lm
 
 #========================================================================
 # List of variants one can make.  all is the default.  We always
@@ -76,18 +72,8 @@ LIBS = -L ../libdieharder -ldieharder -l
 #========================================================================
 all: $(PROGRAM)
 
-$(PROGRAM): $(OBJECTS) $(PROGLIB_SONAME)
-	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJECTS) $(LIBS) 
-
-#========================================================================
-# This is cautiously permitted.  REALLY, though, we need a conditional
-# that punts with a warning if we try this during an rpm build and
-# the library is not found -- the right solution then is to install
-# the library first!
-#========================================================================
-$(PROGLIB_SONAME):
-	- (cd ../libdieharder ;\
-	 $(MAKE))
+$(PROGRAM): $(OBJECTS) ../libdieharder/libdieharder.la
+	$(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJECTS) $(LIBS) 
 
 #========================================================================
 # The only safe place to do commits is in the toplevel directory
@@ -123,10 +109,10 @@ clean : 
 install : $(PROGRAM)
 	(strip $(PROGRAM);\
 	install -d $(prefix)/bin; \
-	install -m 755 $(PROGRAM) $(prefix)/bin; \
-	install -d $(prefix)/share/man/man1; \
+	$(LIBTOOL) --mode=install install -m 755 $(PROGRAM) $(prefix)/bin; \
+	install -d $(mandir)/man1; \
 	gzip -c -9 $(PROGRAM).1 > $(PROGRAM).1.gz; \
-	install -m 644 $(PROGRAM).1.gz $(prefix)/share/man/man1)
+	install -m 644 $(PROGRAM).1.gz $(mandir)/man1)
 
 #========================================================================
 # We give all generic rules below.  Currently we only need a rule for