73 lines
3 KiB
Text
73 lines
3 KiB
Text
$NetBSD: patch-ac,v 1.2 2009/11/30 17:25:08 joerg Exp $
|
|
|
|
--- dieharder/Makefile.am.orig 2007-05-22 02:34:27.000000000 +0200
|
|
+++ 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)
|
|
@@ -57,17 +56,11 @@ DEFINES = -DVERSION=$(VERSION)
|
|
#========================================================================
|
|
# Define parameters and directives needed in compile/link steps.
|
|
#========================================================================
|
|
-# C Compiler
|
|
-CC = gcc
|
|
-
|
|
# Compile flags (use fairly standard -O3 as default)
|
|
-CFLAGS = -O3 -I ../include $(DEFINES)
|
|
-
|
|
-# Linker flags.
|
|
-LDFLAGS =
|
|
+CFLAGS += -I ../include $(DEFINES)
|
|
|
|
# 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 +69,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,15 +106,15 @@ 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
|
|
# objects.
|
|
#========================================================================
|
|
%.o:%.c
|
|
- $(CC) -c $(CFLAGS) $<
|
|
+ $(LIBTOOL) --mode=compile $(CC) -c $(CFLAGS) $<
|
|
|