aboutsummaryrefslogtreecommitdiffstats
path: root/math/msieve/files/patch-Makefile
blob: 6197fb03e8aba4ce53fb68d3698107372763fe0c (plain) (blame)
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
74
75
76
77
78
--- Makefile.orig   Sun May 27 07:36:20 2007
+++ Makefile    Wed May 30 21:57:37 2007
@@ -24,19 +24,19 @@
 
 # gcc with basic optimization (-march flag could
 # get overridden by architecture-specific builds)
-CC = gcc
+#CC = gcc
 WARN_FLAGS = -Wall -W -Wconversion
-OPT_FLAGS = -O3 -fomit-frame-pointer -DNDEBUG -march=athlon
+#OPT_FLAGS = -O3 -fomit-frame-pointer -DNDEBUG -march=athlon
 # OPT_FLAGS = -O3 -fomit-frame-pointer -DNDEBUG -march=k8
 
 # note that if GSL was built as a shared library you may need
 # to append -lgslcblas to LIB_GSL, or even build a static version
 # Note to MinGW users: comment out LIB_THREAD, you don't need it
 
-LIB_THREAD = -lpthread
-LIB_GSL = -lgsl
+LIB_THREAD = $(PTHREAD_LIBS)
+LIB_GSL = -lgsl -lgslcblas
 
-CFLAGS = $(OPT_FLAGS) $(MACHINE_FLAGS) $(WARN_FLAGS) -Iinclude
+CFLAGS += $(WARN_FLAGS) -Iinclude $(CPPFLAGS)
 
 #---------------------------------- Generic file lists -------------------
 
@@ -160,7 +160,7 @@
    ar r libmsieve.a $(COMMON_OBJS_NO_NFS) $(QS_OBJS) \
            $(QS_CORE_OBJS) $(QS_CORE_OBJS_X86)
    ranlib libmsieve.a
-   $(CC) $(CFLAGS) demo.c -o msieve -lm libmsieve.a $(LIB_THREAD)
+   $(CC) $(CFLAGS) $(LDFLAGS) demo.c -o msieve -lm libmsieve.a $(LIB_THREAD)
 
 x86_64: $(COMMON_OBJS_NO_NFS) $(QS_OBJS) \
        $(QS_CORE_OBJS) $(QS_CORE_OBJS_X86_64)
@@ -168,13 +168,13 @@
    ar r libmsieve.a $(COMMON_OBJS_NO_NFS) $(QS_OBJS) \
            $(QS_CORE_OBJS) $(QS_CORE_OBJS_X86_64)
    ranlib libmsieve.a
-   $(CC) $(CFLAGS) demo.c -o msieve -lm libmsieve.a $(LIB_THREAD)
+   $(CC) $(CFLAGS) $(LDFLAGS) demo.c -o msieve -lm libmsieve.a $(LIB_THREAD)
 
 generic: $(COMMON_OBJS_NO_NFS) $(QS_OBJS) $(QS_CORE_OBJS)
    rm -f libmsieve.a
    ar r libmsieve.a $(COMMON_OBJS_NO_NFS) $(QS_OBJS) $(QS_CORE_OBJS)
    ranlib libmsieve.a
-   $(CC) $(CFLAGS) demo.c -o msieve -lm libmsieve.a $(LIB_THREAD)
+   $(CC) $(CFLAGS) $(LDFLAGS) demo.c -o msieve -lm libmsieve.a $(LIB_THREAD)
 
 x86_nfs: $(COMMON_OBJS) $(QS_OBJS) $(NFS_OBJS) \
        $(QS_CORE_OBJS) $(QS_CORE_OBJS_X86)
@@ -182,7 +182,7 @@
    ar r libmsieve.a $(COMMON_OBJS) $(QS_OBJS) $(NFS_OBJS) \
            $(QS_CORE_OBJS) $(QS_CORE_OBJS_X86)
    ranlib libmsieve.a
-   $(CC) $(CFLAGS) demo.c -o msieve -lm libmsieve.a \
+   $(CC) $(CFLAGS) $(LDFLAGS) demo.c -o msieve -lm libmsieve.a \
            $(LIB_THREAD) $(LIB_GSL)
 
 x86_64_nfs: $(COMMON_OBJS) $(QS_OBJS) $(NFS_OBJS) \
@@ -191,14 +191,14 @@
    ar r libmsieve.a $(COMMON_OBJS) $(QS_OBJS) $(NFS_OBJS) \
            $(QS_CORE_OBJS) $(QS_CORE_OBJS_X86_64)
    ranlib libmsieve.a
-   $(CC) $(CFLAGS) demo.c -o msieve -lm libmsieve.a \
+   $(CC) $(CFLAGS) $(LDFLAGS) demo.c -o msieve -lm libmsieve.a \
            $(LIB_THREAD) $(LIB_GSL)
 
 generic_nfs: $(COMMON_OBJS) $(QS_OBJS) $(QS_CORE_OBJS) $(NFS_OBJS)
    rm -f libmsieve.a
    ar r libmsieve.a $(COMMON_OBJS) $(QS_OBJS) $(NFS_OBJS) $(QS_CORE_OBJS)
    ranlib libmsieve.a
-   $(CC) $(CFLAGS) demo.c -o msieve -lm libmsieve.a \
+   $(CC) $(CFLAGS) $(LDFLAGS) demo.c -o msieve -lm libmsieve.a \
            $(LIB_THREAD) $(LIB_GSL)
 
 clean: