# Makefile
# This file holds the make rules for the libilbc 

CC  := @CC@ -Wall
AR  := ar
SED := sed
DEFS :=
INCLUDES := -I@top_srcdir@
CFLAGS := @CFLAGS@ -O3 -funroll-loops -fomit-frame-pointer -fsigned-char @MODULE_CFLAGS@
LDFLAGS:= @LDFLAGS@

PROGS=
LIBS = libilbc.a
OBJS= anaFilter.o iCBSearch.o packing.o \
        constants.o gainquant.o iLBC_decode.o StateConstructW.o \
        createCB.o getCBvec.o iLBC_encode.o StateSearchW.o doCPLC.o \
        helpfun.o syntFilter.o enhancer.o hpInput.o LPCdecode.o \
        filter.o hpOutput.o LPCencode.o FrameClassify.o  iCBConstruct.o lsf.o

LOCALFLAGS =
LOCALLIBS =
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(CFLAGS)
LINK = $(CC) $(LDFLAGS)

prefix = @prefix@
exec_prefix = @exec_prefix@

.PHONY: all
all: $(LIBS) $(PROGS)

.PHONY: strip
strip: all
	strip --strip-debug --discard-locals $(PROGS)

.PHONY: clean
clean:
	@-$(RM) $(PROGS) $(LIBS) $(OBJS) core 2>/dev/null

%.o: @srcdir@/%.c
	$(COMPILE) -c $<

Makefile: @srcdir@/Makefile.in ../../config.status
	cd ../.. && ./config.status

libilbc.a: $(OBJS)
	$(AR) rcs $@ $^
