aboutsummaryrefslogtreecommitdiff
path: root/src/makefile.linux
blob: e643aef86c7d93c7f397e4f44f2f671fd5076cd1 (plain)
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
76
77
78
79
80
81
current: all


# the ANN-EXTERNAL-makefile
# everything is GnuGPL that should come with the ann.tgz
# NO WARRANTIES FOR ANYTHING
# et cetera
# (l) forum::für::umläute 2001

# make sure that the "m_pd.h" is somehow available either by putting it into this
# directory, by adding it's path to the INCLUDE-path or by putting it into an
# already included path, e.g. "/usr/local/include/"
# download fann libraries from http://fann.sourceforge.net
# and install from source
# make sure that fann.h is available

#these are the user adjustables : adjust them to fit into your system
# PD will install to $(DESTDIR)$(INSTALLL_PREFIX)$(PDLIBDIR), which is /usr/local/lib/pd
# by default
DESTDIR =
INSTALL_PREFIX = /usr/local
PDLIBDIR = /lib/pd
#these were the user adjustables


TARGETS = ann \
	ann_som \
	ann_mlp	\
	ann_td \


# ----------------------- LINUX ----------------------------
.SUFFIXES: .pd_linux


LINUXOBJECTS = $(TARGETS:%=%.o)
ARCH = $(shell uname --machine)

PD_DIR = $(DESTDIR)$(INSTALL_PREFIX)$(PDLIBDIR)

ifeq (${ARCH},alpha)
AFLAGS = -mieee  -mcpu=ev56
endif

LINCLUDE =

$(LINUXOBJECTS): *.h

#CFLAGS = -O2 -g -Wall $(LINCLUDE) $(UCFLAGS) $(AFLAGS)
CFLAGS = -O2 -O6 -funroll-loops -march=pentium3 -fomit-frame-pointer -Wall $(LINCLUDE) $(UCFLAGS) $(AFLAGS) 

everything: clean all install distclean

distclean:
	touch dummy.o
	touch dummy.pd_linux
	touch dummy~
	rm *.o *.pd_linux *~

clean:
	touch dummy.o
	touch dummy.pd_linux
	rm *.o *.pd_linux

all: $(LINUXOBJECTS)

	@echo :: $(LINUXOBJECTS)

	ld -export_dynamic  -shared -o ann.pd_linux *.o -lc -lm
	strip --strip-unneeded ann.pd_linux

.c.pd_linux:
	cc $(CFLAGS) -O2 -DPD -fPIC $(INCLUDE) -c -o $*.o $*.c


install: installdocs
	install -m 644 ann.pd_linux $(PD_DIR)/externs

installdocs:
	install -d $(PD_DIR)/doc/5.reference/ann
	install -m644 ../examples/* $(PD_DIR)/doc/5.reference/ann