282
|
1 CC = icc |
|
2 |
|
3 CFLAGS += -I../ |
|
4 |
|
5 # optimize for SPEED |
|
6 # |
|
7 # -mcpu= can be pentium, pentiumpro (covers PII through PIII) or pentium4 |
|
8 # -ax? specifies make code specifically for ? but compatible with IA-32 |
|
9 # -x? specifies compile solely for ? [not specifically IA-32 compatible] |
|
10 # |
|
11 # where ? is |
|
12 # K - PIII |
|
13 # W - first P4 [Williamette] |
|
14 # N - P4 Northwood |
|
15 # P - P4 Prescott |
|
16 # B - Blend of P4 and PM [mobile] |
|
17 # |
|
18 # Default to just generic max opts |
|
19 CFLAGS += -O3 -xN -ip |
|
20 |
|
21 # default lib name (requires install with root) |
|
22 # LIBNAME=-ltommath |
|
23 |
|
24 # libname when you can't install the lib with install |
|
25 LIBNAME=../libtommath.a |
|
26 |
|
27 #provable primes |
|
28 pprime: pprime.o |
|
29 $(CC) pprime.o $(LIBNAME) -o pprime |
|
30 |
|
31 # portable [well requires clock()] tuning app |
|
32 tune: tune.o |
|
33 $(CC) tune.o $(LIBNAME) -o tune |
|
34 |
|
35 # same app but using RDTSC for higher precision [requires 80586+], coff based gcc installs [e.g. ming, cygwin, djgpp] |
|
36 tune86: tune.c |
|
37 nasm -f coff timer.asm |
|
38 $(CC) -DX86_TIMER $(CFLAGS) tune.c timer.o $(LIBNAME) -o tune86 |
|
39 |
|
40 # for cygwin |
|
41 tune86c: tune.c |
|
42 nasm -f gnuwin32 timer.asm |
|
43 $(CC) -DX86_TIMER $(CFLAGS) tune.c timer.o $(LIBNAME) -o tune86 |
|
44 |
|
45 #make tune86 for linux or any ELF format |
|
46 tune86l: tune.c |
|
47 nasm -f elf -DUSE_ELF timer.asm |
|
48 $(CC) -DX86_TIMER $(CFLAGS) tune.c timer.o $(LIBNAME) -o tune86l |
|
49 |
|
50 # spits out mersenne primes |
|
51 mersenne: mersenne.o |
|
52 $(CC) mersenne.o $(LIBNAME) -o mersenne |
|
53 |
|
54 # fines DR safe primes for the given config |
|
55 drprime: drprime.o |
|
56 $(CC) drprime.o $(LIBNAME) -o drprime |
|
57 |
|
58 # fines 2k safe primes for the given config |
|
59 2kprime: 2kprime.o |
|
60 $(CC) 2kprime.o $(LIBNAME) -o 2kprime |
|
61 |
|
62 mont: mont.o |
|
63 $(CC) mont.o $(LIBNAME) -o mont |
|
64 |
|
65 |
|
66 clean: |
|
67 rm -f *.log *.o *.obj *.exe pprime tune mersenne drprime tune86 tune86l mont 2kprime pprime.dat *.il |