File: Makefile

package info (click to toggle)
mffm-fftw 1.7-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,764 kB
  • sloc: cpp: 711; makefile: 76
file content (73 lines) | stat: -rw-r--r-- 2,315 bytes parent folder | download
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
#Copyright 2001,2002 Matt Flax <flatmax@ieee.org>
#This file is part of the MFFM FFTw Wrapper library.
#
#MFFM MFFM FFTw Wrapper library is free software; you can 
#redistribute it and/or modify
#it under the terms of the GNU General Public License as published by
#the Free Software Foundation; either version 2 of the License, or
#(at your option) any later version.
#
#MFFM FFTw Wrapper library is distributed in the hope that it will be useful,
#but WITHOUT ANY WARRANTY; without even the implied warranty of
#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#GNU General Public License for more details.
#
#You have received a copy of the GNU General Public License
#along with the MFFM FFTw Wrapper library

LIB     = $(DESTDIR)/usr/lib
INC     = $(DESTDIR)/usr/include/mffm
DOCS     = $(DESTDIR)/usr/share/doc/mffm-fftw-dev

CFLAGS+=-fPIC
CPPFLAGS+=
LDFLAGS+=

CC=g++ -O3
.cc.o:
	$(CC) $(CPPFLAGS) $(CFLAGS) -c $<
.C.o:
	$(CC) $(CPPFLAGS) $(CFLAGS) -c $<
MAKELIB=$(CC) $(LDFLAGS) -shared -Wl,-soname
#EXAMPLES= complexFFTExample real2DFFTExample realFFTExample
SRC= realFFT.cc realFFTData.cc complexFFT.cc
SRC2D= real2DFFT.cc
OBJ=$(SRC:.cc=.o)
OBJ2D=$(SRC2D:.cc=.o)

all: $(OBJ) \
	$(OBJ2D) \
	libs \
	docs \
	ex

docs:
	doxygen

libs: libfft.so.1 lib2Dfft.so.1
libfft.so.1: $(OBJ)
	$(MAKELIB),$@ $(LDFLAGS) -o $@ $^ -lfftw3
lib2Dfft.so.1: $(OBJ2D)
	$(MAKELIB),$@ $(LDFLAGS) -o $@ $^ -lfftw3

ex:
#fftw V2
#	$(CC) *.o -lrfftw -lfftw complexFFTExample.cc -o complexFFTExample
#	$(CC) *.o -lrfftw -lfftw real2DFFTExample.cc -o real2DFFTExample
#	$(CC) *.o -lrfftw -lfftw realFFTExample.cc -o realFFTExample
#fftw V3
#	$(CC) *.o -lfftw3 complexFFTExample.cc -o complexFFTExample
#	$(CC) *.o -lfftw3 real2DFFTExample.cc -o real2DFFTExample
#	$(CC) *.o -lfftw3 realFFTExample.cc -o realFFTExample

install: libfft.so.1 lib2Dfft.so.1 \
	docs
	install --directory $(LIB) $(INC) $(DOCS)/html $(DOCS)/examples
	install lib* $(LIB)
	install -m 644 *.H $(INC)
	install html/* $(DOCS)/html
	install -m 644 complexFFTExample.cc real2DFFTExample.cc realFFTExample.cc sine.1000Hz.dat $(DOCS)/examples

clean:
	rm -f $(EXAMPLES) *.o a.out *~ *.txt lib*.so.* complexFFTExample realFFTExample real2DFFTExample
	$(RM) -r html/*.png html/doxygen.svg html/dynsections.js html/jquery.js html/menudata.js html/menu.js