# UNIX Makefile for EBS tools
# Copyright (C) 1993/94 Markus Kuhn, Institut fuer Physiologie und
#      		        Biokybernetik (IPB), Universitaet Erlangen,
# 		        Deutschland
#
# Permission to use, copy, modify, distribute, and sell this software
# and its documentation for any purpose is hereby granted without fee,
# provided that the above copyright notice appear in all copies and
# related publications and that both that copyright notice and this
# permission notice appear in supporting documentation. The authors make
# no representations about the suitability of this software for any
# purpose. It is provided "as is" without express or implied warranty.
# 
# Send your comments, suggestions or bug reports to
#         ftpebs@uni-erlangen.de
#
# Or mail to
#         Institut fuer Physiologie und Biokybernetik
#         Markus Prosch
#         Universitaetsstrasse 17
#         D-91054 Erlangen
#         Germany
# $Header: /home/ipb12b/hirn/src/ebs/RCS/Makefile,v 1.18 1994/03/11 14:07:39 msprosch Exp $
#
#
#
# Type 'make' in order to compile all, type 'make install' in order to
# copy the necessary files to BINDIR and type 'make clean' to remove
# temporary files.
#


# The ANSI C compiler that we want to use
#CC = acc -Xc -vc
CC = gcc -ggdb -O2 -W

# Compiler flags
CFLAGS =

# That's where 'make install' will put the binaries.
BINDIR = ./bin

# The programs we want to compile
TARGETS = bs2ebs mon70ebs kre2ebs ebstype ebscut ebsconv rphase ebsprint

all: $(TARGETS)

install: all
	if [ ! -d $(BINDIR) ]; then mkdir $(BINDIR) ;fi
	strip $(TARGETS)
	cp $(TARGETS) $(BINDIR)

bs2ebs: bs2ebs.o ebs.o
	$(CC) $(CFLAGS)	-o bs2ebs bs2ebs.o ebs.o -lm

mon70ebs: mon70ebs.o ebs.o
	$(CC) $(CFLAGS) -o mon70ebs mon70ebs.o ebs.o

kre2ebs: kre2ebs.o ebs.o
	$(CC) $(CFLAGS)	-o kre2ebs kre2ebs.o ebs.o


ebstype: ebstype.o ebs.o
	$(CC) $(CFLAGS)	-o ebstype ebstype.o ebs.o

ebsconv: ebsconv.o ebs.o
	$(CC) $(CFLAGS) -o ebsconv ebsconv.o ebs.o

ebscut: ebscut.o ebs.o
	$(CC) $(CFLAGS) -o ebscut ebscut.o ebs.o

rphase: rphase.o ebs.o ebshead.o
	$(CC) $(CFLAGS) -o rphase rphase.o ebs.o ebshead.o -lm

ebsprint: ebsprint.o ebs.o ebshead.o
	$(CC) $(CFLAGS) -o ebsprint ebsprint.o ebs.o ebshead.o -lm


ebs.o:      ebs.c      ebs.h
ebshead.o:  ebshead.c  ebs.h ebshead.h
ebstype.o:  ebstype.c  ebs.h
ebscut.o:   ebscut.c   ebs.h
ebsconv.o:  ebsconv.c  ebs.h
rphase.o:   rphase.c   ebs.h ebshead.h
ebsprint.o: ebsprint.c ebs.h ebshead.h
bs2ebs.o:   bs2ebs.c   ebs.h
kre2ebs.o:  kre2ebs.c  ebs.h
mon70ebs.o: mon70ebs.c ebs.h


clean:
	rm -f core a.out *.o *~ \#*\#
	rm -f $(TARGETS)

