
# where fiacre.h and avl files are found, please adapt
LIBHOME=../../lib
CDEFS=-DCOMPRESSION

# name prefix for the tts to be generated
NAME=?

# target dependant
# i386 Windows, assuming mingw gcc; please adapt if other compiler in use
EXT=.dll
SHFLG=-shared
CFLAGS=-m32


# compiles the library into the tts
# e.g.  make NAME=myapp
all:
	 @if test $(NAME) = ?; then echo "usage:  make NAME=rootname"; else $(MAKE) $(NAME); fi

$(NAME): $(NAME).fcr
	 mkdir -p $(NAME).tts
	 gcc $(CFLAGS) $(CDEFS) -O2 -o $(NAME)$(EXT) $(SHFLG) -I $(LIBHOME) -I $(LIBHOME)/avl $(NAME).tts/`basename $(NAME)`.c $(LIBHOME)/avl/avl.c
	 mv $(NAME)$(EXT) $(NAME).tts

clean:
	 rm -rf $(NAME).tts

