aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIOhannes m zmölnig <zmoelnig@users.sourceforge.net>2005-05-19 14:06:39 +0000
committerIOhannes m zmölnig <zmoelnig@users.sourceforge.net>2005-05-19 14:06:39 +0000
commitd0caa75bcc981df942b506e011021c8134383d4b (patch)
treec796e76c61819c2f0929f5e2cbb2fb87186f84e2
parent1fafd576f7b3e8fee09a68c6d3f664d35cf96f30 (diff)
now it compiles on my system, producing a bunch of pd_linux's
svn path=/trunk/externals/ann/; revision=3027
-rw-r--r--src/makefile.linux68
1 files changed, 37 insertions, 31 deletions
diff --git a/src/makefile.linux b/src/makefile.linux
index e643aef..9e74eed 100644
--- a/src/makefile.linux
+++ b/src/makefile.linux
@@ -1,6 +1,3 @@
-current: all
-
-
# the ANN-EXTERNAL-makefile
# everything is GnuGPL that should come with the ann.tgz
# NO WARRANTIES FOR ANYTHING
@@ -20,14 +17,20 @@ current: all
DESTDIR =
INSTALL_PREFIX = /usr/local
PDLIBDIR = /lib/pd
-#these were the user adjustables
+# the *.dll-files go into $(DESTDIR)$(INSTALLL_PREFIX)$(PDLIBDIR)$(LIBRARY_DIR)
+LIBRARY_DIR=/extra
+# the reference-files go into $(DESTDIR)$(INSTALLL_PREFIX)$(PDLIBDIR)$(REFERENCE_DIR)
+#REFERENCE_DIR=/doc/5.reference/ann
+REFERENCE_DIR=/extra/help-ann
+
+#these were the user adjustables
+#---------------------------------
-TARGETS = ann \
- ann_som \
- ann_mlp \
- ann_td \
+TARGETS = ann_som.c \
+ ann_mlp.c \
+ ann_td.c \
# ----------------------- LINUX ----------------------------
.SUFFIXES: .pd_linux
@@ -37,45 +40,48 @@ LINUXOBJECTS = $(TARGETS:%=%.o)
ARCH = $(shell uname --machine)
PD_DIR = $(DESTDIR)$(INSTALL_PREFIX)$(PDLIBDIR)
+PD_INSTALLDIR_LIB = $(PD_DIR)$(LIBRARY_DIR)
+PD_INSTALLDIR_REF = $(PD_DIR)$(REFERENCE_DIR)
ifeq (${ARCH},alpha)
-AFLAGS = -mieee -mcpu=ev56
+AFLAGS = -mieee -mcpu=ev56
endif
+
+STRIP=strip
+STRIPFLAGS=--strip-unneeded
+
+
LINCLUDE =
-$(LINUXOBJECTS): *.h
+OPTIMIZE_FLAGS = -O2 -O6 -funroll-loops -march=pentium3
+DEFS = -DPD
#CFLAGS = -O2 -g -Wall $(LINCLUDE) $(UCFLAGS) $(AFLAGS)
-CFLAGS = -O2 -O6 -funroll-loops -march=pentium3 -fomit-frame-pointer -Wall $(LINCLUDE) $(UCFLAGS) $(AFLAGS)
+CFLAGS = $(OPTIMIZE_FLAGS) -fomit-frame-pointer -fPIC -Wall $(LINCLUDE) $(UCFLAGS) $(AFLAGS) $(DEFS)
-everything: clean all install distclean
-
-distclean:
- touch dummy.o
- touch dummy.pd_linux
- touch dummy~
- rm *.o *.pd_linux *~
+LDFLAGS = -Wl,-export_dynamic -shared
+LIBS = -lc -lm -lfann
-clean:
- touch dummy.o
- touch dummy.pd_linux
- rm *.o *.pd_linux
+# here come the targets
-all: $(LINUXOBJECTS)
+all: $(TARGETS:%.c=%.pd_linux)
- @echo :: $(LINUXOBJECTS)
+%.pd_linux: %.c
+ $(CC) $(CFLAGS) $(INCLUDE) $(LDFLAGS) -o "$*.pd_linux" "$*.c" $(LIBS)
+ $(STRIP) $(STRIPFLAGS) "$*.pd_linux"
- ld -export_dynamic -shared -o ann.pd_linux *.o -lc -lm
- strip --strip-unneeded ann.pd_linux
+everything: clean all install distclean
-.c.pd_linux:
- cc $(CFLAGS) -O2 -DPD -fPIC $(INCLUDE) -c -o $*.o $*.c
+distclean:
+ -rm *.o *.pd_linux *~
+clean:
+ -rm *.o *.pd_linux
install: installdocs
- install -m 644 ann.pd_linux $(PD_DIR)/externs
+ install -m 644 ann*.pd_linux $(PD_INSTALLDIR_LIB)
installdocs:
- install -d $(PD_DIR)/doc/5.reference/ann
- install -m644 ../examples/* $(PD_DIR)/doc/5.reference/ann
+ install -d $(PD_INSTALLDIR_REF)
+ install -m644 ../examples/* $(PD_INSTALLDIR_REF)