# Copyright 1997 by Claus Roedenbeck, Technische Universitaet 
# Hannover, Germany. See the accompanying file "COPYRIGHT" for
# details.  THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE.


# Put the gsm library in a place where gcc finds it

LIBGSM		= -lgsm

####

# Where to install the binaries

INSTALL_ROOT =	/usr/local
INSTALL_BIN  =	$(INSTALL_ROOT)/bin

####

CC 		= gcc 
CFLAGS 		= -c -O2 -Wall -DFRAGMENT -DSRATE -DSTEREO 
LD 		= $(CC)
INCLUDE	        = -I../include
LIBS 	        = -L../lib -ln $(LIBGSM) 

export CC CFLAGS LD INCLUDE LIBS

# Targets

LIBN	      = libn.a
WHISPER	      = whisper
WHISPERD      = whisperd

export LIBN WHISPER WHISPERD

SUBDIRS       =  lib whisper whisperd
TARGETS	      =  whisper/$(WHISPER) whisperd/$(WHISPERD)

all:
	for i in $(SUBDIRS); do make  -C $$i ; done

install:
	install -d $(INSTALL_BIN)
	for i in $(TARGETS); do install  -m 755 $$i $(INSTALL_BIN) ; done

clean:
	for i in $(SUBDIRS); do make -C $$i clean ; done
