#define DoNormalLib  NO
#define DoSharedLib  YES
#define DoDebugLib   NO
#define DoProfileLib NO
#define IncSubdir mas

XCOMM ################ Architecture dependent ###########################

#if defined(LinuxArchitecture) || defined(SunArchitecture)
XCOMM ###### THIS ISN'T RIGHT -- NEED TO TEST FOR POSIX.1b HERE #########
ARCHREQUIREDLIBS = 
        ARCHDEFS = 
        ARCHOBJS = mas_time_posix1b.o
        ARCHSRCS = mas_time_posix1b.c
#else
ARCHREQUIREDLIBS = 
        ARCHDEFS = 
        ARCHOBJS = mas_time_unix.o
        ARCHSRCS = mas_time_unix.c
#endif


XCOMM ################ END Architecture dependent ########################

        INCLUDES = -I./ -I$(BUILDINCDIR)
         DEFINES = $(ARCHDEFS)
            SRCS = mas_rtmemory.c mas_error.c mas_data.c mas_time.c	\
                   mas_nanosleep_reality.c strings.c dc.c pushpull.c	\
                   mas_event.c mas_logging.c mas_cpu.c			\
                   mas_audio_basic.c mas_real_time_process.c		\
                   mas_stats.c $(ARCHSRCS)
            OBJS = mas_rtmemory.o mas_error.o mas_data.o mas_time.o	\
                   mas_nanosleep_reality.o strings.o dc.o		\
                   pushpull.o mas_event.o mas_logging.o mas_cpu.o	\
                   mas_audio_basic.o mas_real_time_process.o		\
                   mas_stats.o $(ARCHOBJS)

 LOCAL_LIBRARIES = 
   SYS_LIBRARIES = 
         DEPLIBS = 
    REQUIREDLIBS = $(ARCHREQUIREDLIBS) -lm
         HEADERS = mas_common.h mas_constants.h mas_endian.h mas_error.h \
                   mas_misc.h mas_nanosleep_reality.h mas_types.h \
                   mas_logging.h mas_audio_basic.h mas_real_time_process.h \
                   mas_stats.h

#include <Library.tmpl>

LibraryObjectRule()

#if DoNormalLib
NormalLibraryTarget(masc,$(OBJS))
InstallLibrary(masc,$(LIBDIR))
#endif

#if DoDebugLib
DebuggedLibraryTarget(masc,$(OBJS))
InstallLibrary(masc_d,$(LIBDIR))
#endif

#if DoProfileLib
ProfiledLibraryTarget(masc,$(OBJS) $(LOCAL_LIBRARIES))
InstallLibrary(masc_p,$(LIBDIR))
#endif

#if DoSharedLib && !DoNormalLib
SharedLibraryTarget(masc,1.0,$(OBJS) $(LOCAL_LIBRARIES),.,.)
InstallSharedLibrary(masc,1.0,$(LIBDIR))
#endif

BuildIncludes($(HEADERS),IncSubdir,..)
InstallMultipleFlags($(HEADERS),$(INCDIR)/IncSubdir,$(INSTINCFLAGS))

DependTarget()
