[go: up one dir, main page]

File: Makefile

package info (click to toggle)
fftw 2.1.5-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, wheezy
  • size: 6,528 kB
  • ctags: 3,756
  • sloc: ansic: 65,239; sh: 12,650; ml: 3,084; perl: 2,894; makefile: 408; fortran: 102
file content (66 lines) | stat: -rw-r--r-- 1,496 bytes parent folder | download | duplicates (5)
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
FFTWDIR = ../fftw
FFTW_INCLUDE = -I$(FFTWDIR)

FFTW_CILK_OBJ = executor_cilk.o fftwnd_cilk.o 

LIBFFTW_CILK = libfftw_cilk.a
CILK = cilk
LIBS = -L../fftw/.libs -lfftw -lm

# Set where you want to install the library for "make install"
prefix = /usr/local
LIBDIR = $(prefix)/lib
INCLUDEDIR = $(prefix)/include

# On systems that have ranlib:
RANLIB = ranlib

# On systems that don't have ranlib
# RANLIB = echo ranlib

all:	$(LIBFFTW_CILK)

tests: test_cilk time_cilk

RM = rm

clean:	
	$(RM) -f *.o core a.out *~ *.s *.bak 

distclean: clean
	$(RM) -f $(LIBFFTW_CILK) test_cilk time_cilk *.out

####################### Cilk Libraries, etc. ####################

HEADERS = $(FFTWDIR)/fftw.h fftw_cilk.cilkh
CILKCFLAGS = $(FFTW_INCLUDE) $(CFLAGS) -O6 -DFFTW_USING_CILK

###################### Building fftw_cilk #######################

AR = ar

%.o:	%.cilk $(HEADERS)  Makefile
	$(CILK) $(CILKCFLAGS) -c $< -o $@

%.s:	%.c $(HEADERS)  Makefile
	$(CILK) $(CILKCFLAGS) -S $< -o $@


$(LIBFFTW_CILK): $(FFTW_CILK_OBJ)
	$(RM) -f $(LIBFFTW_CILK)
	$(AR) rv $(LIBFFTW_CILK) $(FFTW_CILK_OBJ)
	$(RANLIB) $(LIBFFTW_CILK)

install: $(LIBFFTW_CILK)
	$(CP) $(LIBFFTW_CILK) $(LIBDIR)
	$(RANLIB) $(LIBDIR)/$(LIBFFTW_CILK)
	$(CP) fftw_cilk.cilkh $(INCLUDEDIR)

test_cilk: test_cilk.o $(LIBFFTW_CILK) 
	$(CILK) $(LDFLAGS) test_cilk.o \
              $(LIBFFTW_CILK) $(LIBS) -o test_cilk

time_cilk: time_cilk.o $(LIBFFTW_CILK) 
	$(CILK) $(LDFLAGS) time_cilk.o \
              $(LIBFFTW_CILK) $(LIBS) -o time_cilk