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

SIMPLELIBNAME = mas_cdrom

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

ARCHREQUIREDLIBS = 
        ARCHDEFS = 
        ARCHOBJS = 
        ARCHSRCS = 

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


        INCLUDES = -I./ -I$(BUILDINCDIR)
         DEFINES = -D$(MAS_ENDIANNESS) $(ARCHDEFS)

      DEVICENAME = $(SIMPLELIBNAME)_device
   CLIENTLIBNAME = $(SIMPLELIBNAME)

#if defined(LinuxArchitecture) || defined(FreeBSDArchitecture) || defined(SunArchitecture) 
      DEVICESRCS = cdrom_unix_device.c freedb.c $(ARCHSRCS)
      DEVICEOBJS = cdrom_unix_device.o freedb.o $(ARCHSRCS)
#endif
   CLIENTLIBSRCS = $(CLIENTLIBNAME).c $(ARCHSRCS)
   CLIENTLIBOBJS = $(CLIENTLIBNAME).o $(ARCHOBJS)
            SRCS = $(DEVICESRCS) $(CLIENTLIBSRCS) # need this for depend

 LOCAL_LIBRARIES = 
   SYS_LIBRARIES = -lsocket -lnsl
         DEPLIBS = 
    REQUIREDLIBS = $(ARCHREQUIREDLIBS) -L $(BUILDLIBDIR) -lmasc

         HEADERS = mas_cdrom.h mas_cdrom_common.h

#include <Library.tmpl>

LibraryObjectRule()


#if DoNormalLib
NormalLibraryTarget($(DEVICENAME),$(DEVICEOBJS))
InstallLibrary($(DEVICENAME),$(DEVICEDIR))
#endif

#if DoDebugLib
DebuggedLibraryTarget($(DEVICENAME),$(DEVICEOBJS))
InstallLibrary($(DEVICENAME)_d,$(DEVICEDIR))
#endif

#if DoProfileLib
ProfiledLibraryTarget($(DEVICENAME),$(DEVICEOBJS))
InstallLibrary($(DEVICENAME)_p,$(DEVICEDIR))
#endif

#if DoSharedLib && !DoNormalLib
SharedLibraryTarget($(DEVICENAME),1.0,$(DEVICEOBJS),.,.)
InstallSharedLibrary($(DEVICENAME),1.0,$(DEVICEDIR))
#endif

XCOMM # Add a target for the client-side interface library

AllTarget($(SIMPLELIBNAME).o)

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

DependTarget()
