# $Header: /crl/audio/AF/lib/AF/RCS/Imakefile,v 1.25 1994/06/01 20:16:44 tml Exp $
#include <Library.tmpl>

#if HasDESLibrary
        DESDEFS = -DHASDES
        DESOBJS = Encrypt.o
        DESSRCS = Encrypt.c
#else
        DESDEFS =
        DESOBJS =
        DESSRCS =
#endif
       INCLUDES = -I. -I$(TOP)/include -I$(INCLUDESRC)
   CONN_DEFINES = ConnectionFlags
     EDB_DEFINES = -DERRORDB=\"$(LIBDIR)/AErrorDB\"
   INSTALLFLAGS = $(INSTINCFLAGS)
       AUTHOBJS = AuDispose.o AuGetAddr.o AuFileName.o AuRead.o 
       AUTHSRCS = AuDispose.c AuGetAddr.c AuFileName.c AuRead.c 
       AAUTHSRC = ../Aau
        AFUOBJS = samples.o Silence.o AoD.o
        AFUSRCS = samples.c Silence.c AoD.c
         AFUSRC = ../AFUtil
           SRCS = *.c
        HEADERS = AFlib.h Alibint.h Alibos.h
       LINTLIBS =

OBJS1 = Access.o\
	AlibInt.o\
	AFDialPhone.o \
	ChACAttrs.o\
	ChangeProp.o\
	ChkIfEvent.o\
	CloseConn.o\
	Connect.o\
	ConnName.o\
	ControlIO.o\
	CreateAC.o\
	CreatePAC.o\
	DeleteProp.o\
	ErrHndlr.o\
	ErrDes.o\
	FreeEData.o\
	FreeAC.o\
	GetAtomName.o\
	GetProperty.o\
	GetTime.o\
	HookSwitch.o\
	Host.o\
	IfEvent.o\
	InitExt.o\
	InternAtom.o\
	ListExt.o\
	ListHosts.o\
	ListProps.o\
	OpenConn.o\
	Pending.o\
	NextEvent.o\
	NoOp.o\
	Play.o\
	PlayAsync.o \
	PeekIfEvent.o\
	QueryExt.o\
	QueryGain.o\
	QueryPhone.o\
	Record.o\
	RecordAsync.o\
	SelEvents.o\
	SetGain.o\
	Synchro.o\
	Sync.o\
	globals.o\
	$(AUTHOBJS) \
        $(AFUOBJS)

OBJS = $(OBJS1) $(OBJS2)

all::

# if DebugLibAudio && ProfileLibAudio
DebuggedAndProfiledLibraryObjectRule()
SpecialDebuggedObjectRule(AErrDes.o,$(ICONFIGFILES),$(EDB_DEFINES))
SpecialDebuggedAndProfiledObjectRule(AConn.o,$(ICONFIGFILES),$(CONN_DEFINES))
SpecialDebuggedAndProfiledObjectRule(AOpenConn.o,$(ICONFIGFILES),$(DESDEFS))
SpecialDebuggedAndProfiledObjectRule(AlibInt.o,$(ICONFIGFILES),$(CONN_DEFINES))
SpecialDebuggedAndProfiledObjectRule(globals.o,$(ICONFIGFILES),$(CONN_DEFINES))
# else
#  if DebugLibAudio
DebuggedLibraryObjectRule()
SpecialDebuggedObjectRule(AErrDes.o,$(ICONFIGFILES),$(EDB_DEFINES))
SpecialDebuggedObjectRule(AConn.o,$(ICONFIGFILES),$(CONN_DEFINES))
SpecialDebuggedObjectRule(AOpenConn.o,$(ICONFIGFILES),$(DESDEFS))
SpecialDebuggedObjectRule(AlibInt.o,$(ICONFIGFILES),$(CONN_DEFINES))
SpecialDebuggedObjectRule(globals.o,$(ICONFIGFILES),$(CONN_DEFINES))
#  else
#   if ProfileLibAudio
ProfiledLibraryObjectRule()
SpecialProfiledObjectRule(AErrDes.o,$(ICONFIGFILES),$(EDB_DEFINES))
SpecialProfiledObjectRule(AConn.o,$(ICONFIGFILES),$(CONN_DEFINES))
SpecialProfiledObjectRule(AOpenConn.o,$(ICONFIGFILES),$(DESDEFS))
SpecialProfiledObjectRule(AlibInt.o,$(ICONFIGFILES),$(CONN_DEFINES))
SpecialProfiledObjectRule(globals.o,$(ICONFIGFILES),$(CONN_DEFINES))
#   else
NormalLibraryObjectRule()
SpecialObjectRule(ErrDes.o,$(ICONFIGFILES),$(EDB_DEFINES))
SpecialObjectRule(Connect.o,$(ICONFIGFILES),$(CONN_DEFINES))
SpecialObjectRule(OpenConn.o,$(ICONFIGFILES),$(DESDEFS))
SpecialObjectRule(AlibInt.o,$(ICONFIGFILES),$(CONN_DEFINES))
SpecialObjectRule(globals.o,$(ICONFIGFILES),$(CONN_DEFINES))
#   endif
#  endif
# endif

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

LintLibraryTarget(AF,*.c)


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

/* InstallNonExec(AErrorDB,$(LIBDIR)) */

InstallLintLibrary(AF,$(LINTLIBDIR))


#if ProfileLibAudio && ProfileLibAudioArchive
ProfiledLibraryTarget(AF,$(OBJS))
AliasedLibraryTarget(AF_p,AF_p)
InstallLibrary(AF_p,$(USRLIBDIR))
#endif

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

AuDispose.c:  $(AAUTHSRC)/AuDispose.c
	$(RM) $@
	$(LN) $? $@

AuGetAddr.c:  $(AAUTHSRC)/AuGetAddr.c
	$(RM) $@
	$(LN) $? $@

AuFileName.c:  $(AAUTHSRC)/AuFileName.c
	$(RM) $@
	$(LN) $? $@

AuRead.c:  $(AAUTHSRC)/AuRead.c
	$(RM) $@
	$(LN) $? $@

samples.c:  $(AFUSRC)/samples.c
	$(RM) $@
	$(LN) $? $@

Silence.c:  $(AFUSRC)/Silence.c
	$(RM) $@
	$(LN) $? $@

AoD.c:  $(AFUSRC)/AoD.c
	$(RM) $@
	$(LN) $? $@

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

clean::
	$(RM) $(AUTHSRCS) $(DESSRCS)

depend:: $(AUTHSRCS) $(DESSRCS) $(AFUSRCS)

DependTarget()


/**/# structure alignment errors can safely be ignored.
/**/# complaints about qevent can be ignored too.

NormalLintTarget(*.c)
