
FLAGS=-I. @LIBAO_FLAGS@ @CFLAGS@ $(CFLAGS)
OPT=@OPT@ $(FLAGS)
DEBUG=@DEBUG@ $(FLAGS)
PROFILE=@PROFILE@ $(FLAGS)
CC=@CC@
LD=@CC@
LIBS=@LIBS@
LDFLAGS=@LDFLAGS@ $(FLAGS)
AR=@AR@
INSTALL=@INSTALL@
RANLIB=@RANLIB@

LIBAO_FILES=audio_out.o ao_null.o ao_wav.o @LIBAO_OBJS@

.PHONY: all debug profile target clean distclean install

all:
	@$(MAKE) target CFLAGS="$(OPT)"

debug:
	@$(MAKE) target CFLAGS="$(DEBUG)"

profile:
	@$(MAKE) target CFLAGS="$(PROFILE)"

target: libao.a

libao.a: $(LIBAO_FILES)
	$(AR) -r libao.a $(LIBAO_FILES)
	$(RANLIB) libao.a

.c.o:
	$(CC) $(FLAGS) -c $<

clean:
	-rm -rf *.o *.a *~ *.out

distclean: clean
	-rm -f Makefile config.h config.log config.cache config.status ao_libs.inc


