Makefile 1.33 KB
Newer Older
thomas.forbriger's avatar
new  
thomas.forbriger committed
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
# this is <Makefile>
# ----------------------------------------------------------------------------
# $Id: Makefile,v 1.1 2002-11-08 20:33:35 forbrig Exp $
# 
# Copyright (c) 2002 by Thomas Forbriger (IMG Frankfurt) 
# 
# Fourier coefficients library
#
# provide Fourier coefficients of filter responses etc.
# 
# REVISIONS and CHANGES 
#    07/11/2002   V1.0   Thomas Forbriger
# 
# ============================================================================
#

all:

flist: Makefile
	echo $^ | tr ' ' '\n' | sort > $@

.PHONY: edit
edit: flist; vim $<

.PHONY: clean
clean: ; 
	-find . -name \*.bak | xargs --no-run-if-empty /bin/rm -v
	-/bin/rm -vf flist

ifdef CROSS_BASE
  BINPREFIX=$(CROSS_BASE)/bin/dos-
else
  BINPREFIX=
endif

FC=$(BINPREFIX)g77
CC=$(BINPREFIX)gcc
AR=$(BINPREFIX)ar
AS=$(BINPREFIX)as
RANLIB=$(BINPREFIX)ranlib

F2CLIB=-lm -lf2c -L${SERVERLIBDIR}
F2CFLAGS=-f -u
#CC=gcc
CFLAGS=-O2 -I${SERVERINCLUDEDIR} -I${LOCINCLUDEDIR}

LIBSRC=
LIBOBS=$(patsubst %.f,%.o,$(LIBSRC))

docs: $(DOCS)

.f.o:
	f2c $(F2CFLAGS) $<
	$(CC) $(CFLAGS) $(<:.f=.c) -c 
	@rm  $(<:.f=.c)

%.o77: %.f
	$(FC) $(FFLAGS) -c -o $@ $<

clean:
	-/bin/rm *.o *.bak *.doc *.o77

libfourier.doc: $(LIBSRC)
	makefdoc.pl $@ $^


libfourier77.a: $(patsubst %.o,%.o77,$(LIBOBS))
libfourier.a: $(LIBOBS)

%.a: 
	$(AR) rcv $@ $^
	$(RANLIB) $@
	newlib $@

# ----- END OF Makefile -----