#include <Library.tmpl>

#define PassCDebugFlags 'CDEBUGFLAGS=$(CDEBUGFLAGS)'

       INCLUDES = -I. -I$(TOP)/include -I$(INCLUDESRC) -Igsm
   CONN_DEFINES = ConnectionFlags
     EDB_DEFINES = -DERRORDB=\"$(LIBDIR)/AErrorDB\"
   INSTALLFLAGS = $(INSTINCFLAGS)
        HEADERS = AFConvert.h AFima.h AFScalar.h AFadpcm.h AFgsm.h
        LINTLIBS =
           SRCS = AFima.c \
	          AFScalar.c \
	          AFConvert.c \
		  AFadpcm.c \
		  AFgsm.c

#include "gsm/GSMLIBOBJ"
OBJS2 = $(GSMLIBOBJ)

OBJS1 = 	AFima.o \
                AFScalar.o \
	        AFConvert.o \
		AFadpcm.o \
		AFgsm.o

OBJS = $(OBJS1) $(OBJS2)

all::

# make subdirs first
#define IHaveSubdirs
SUBDIRS = gsm
ALLSUBDIRS = gsm

MakeSubdirs($(SUBDIRS))
DependSubdirs($(SUBDIRS))
# MakeLintLibSubdirs($(SUBDIRS))
# LintSubdirs($(SUBDIRS))

NamedCleanSubdirs(AllClean,$(ALLSUBDIRS))
NamedTagSubdirs(AllTags,$(ALLSUBDIRS))

MakeMakeSubdirs($(ALLSUBDIRS),AllMakefiles)
# end make subdirs first


NormalLibraryTarget2(AFConvert,$(OBJS1),$(OBJS2))
InstallLibrary(AFConvert,$(USRLIBDIR))

LintLibraryTarget(AFConvert,*.c)

BuildIncludes($(HEADERS),.,.)
InstallMultiple($(HEADERS),$(INCDIR))

InstallLintLibrary(AFConvert,$(LINTLIBDIR))


#if ProfileLibAudio && ProfileLibAudioArchive
ProfiledLibraryTarget(AFConvert,$(OBJS))
AliasedLibraryTarget(AFConvert_p,AFConvert_p)
InstallLibrary(AFConvert_p,$(USRLIBDIR))
#endif

#if DebugLibAudio && DebugLibAudioArchive
DebuggedLibraryTarget(AFConvert,$(OBJS))
#endif

#if HasSaberC
saber_src:
	/**/#load $(CFLAGS) $(CONN_DEFINES) $(EXT_DEFINES) \
		$(SRCS)
#endif

clean::

depend::

DependTarget()


# stuff related to gsm

