| 1 | |
| 2 | CFLAGS=-Wall -I. |
| 3 | |
| 4 | #optimized |
| 5 | CFLAGS+=-O2 |
| 6 | |
| 7 | #debug information |
| 8 | CFLAGS+=-g |
| 9 | |
| 10 | #RCU debug (slower, with error-checks) |
| 11 | #CFLAGS+=-DDEBUG_RCU |
| 12 | |
| 13 | LDFLAGS=-lpthread |
| 14 | |
| 15 | HOSTTYPE=$(shell uname -m) |
| 16 | |
| 17 | ifeq ("${HOSTTYPE}","x86_64") |
| 18 | ARCHTYPE=x86 |
| 19 | endif |
| 20 | ifeq ("${HOSTTYPE}","i586") |
| 21 | ARCHTYPE=x86 |
| 22 | endif |
| 23 | ifeq ("${HOSTTYPE}","i686") |
| 24 | ARCHTYPE=x86 |
| 25 | endif |
| 26 | ifeq ("${HOSTTYPE}","powerpc") |
| 27 | ARCHTYPE=ppc |
| 28 | endif |
| 29 | ifeq ("${HOSTTYPE}","ppc64") |
| 30 | ARCHTYPE=ppc |
| 31 | endif |
| 32 | ifeq ("${HOSTTYPE}","ppc") |
| 33 | ARCHTYPE=ppc |
| 34 | endif |
| 35 | ifeq ("${HOSTTYPE}","s390") |
| 36 | ARCHTYPE=s390 |
| 37 | endif |
| 38 | ifeq ("${HOSTTYPE}","s390x") |
| 39 | ARCHTYPE=s390 |
| 40 | endif |
| 41 | |
| 42 | #Changing the signal number used by the library. SIGUSR1 by default. |
| 43 | #CFLAGS+=-DSIGURCU=SIGUSR2 |
| 44 | |
| 45 | SRC_DEP=`echo $^ | sed 's/[^ ]*\.h//g'` |