################################################################################
##
## Filename:      Makefile
##
## Function:      This Makefile contains the compile and building
##                instructions for ...
##
## Copyright:     CHRISTIAN MOTZ / INTERNAL USE ONLY
##
##                (C) COPYRIGHT CHRISTIAN MOTZ 2006
##
## Version:       Release 1, Level 1
##
## @(#)Makefile	1.1 (cmo) 1/27/06";
##
## Change Activity:
##
## 060127 -- CMO: Module created.
##
################################################################################

CFLAGS=-O6 -Wall -Dlint

# CC=arm-linux-gcc
# STRIP=arm-linux-strip
CC=$(TARGET)gcc
STRIP=$(TARGET)strip

OBJS=main.o audio.o filter.o fsk.o async.o fft.o bwfax.o cset.o cfg.o \
sitor-b.o cw.o sitor-a.o gmdss.o term.o
PROGRAM=zhfcom
LIBS=-lkiss_fft -lm

OPSYS=lin

$(PROGRAM):	$(OBJS)
		$(CC) -o $(PROGRAM) $(OBJS) $(LIBS)
		$(STRIP) $(PROGRAM)

dtmftest:	dtmf.o audio.o filter.o
		$(CC) -o dtmftest dtmf.o audio.o filter.o $(LIBS)
		$(STRIP) dtmftest

dtmf.o:		dtmf.c audio.h filter.h

main.o:		main.c audio.h fsk.h async.h fft.h cset.h cfg.h sitor-b.h cw.h \
sitor-a.h

audio.o:	audio_$(OPSYS).c audio.h
		$(CC) $(CFLAGS) -c -o audio.o audio_$(OPSYS).c

filter.o:	filter.c filter.h

fsk.o:		fsk.c fsk.h filter.h

async.o:	async.c async.h

fft.o:		fft.c fft.h

bwfax.o:	bwfax.c	bwfax.h filter.h

cset.o:		cset.c cset.h

cfg.o:		cfg.c cfg.h

sitor-b.o:	sitor-b.c sitor-b.h

sitor-a.o:	sitor-a.c sitor-a.h sitor-b.h cset.h

cw.o:		cw.c cw.h filter.h

gmdss.o:	gmdss.c gmdss.h

term.o:		term.c term.h

clean:
		rm -f $(OBJS)

spotless:	clean
		rm -f $(PROGRAM)

