# ****************************************************************************
# MAKEFILE. LIBCTS.1.4 (C) MICROBOTICA, S.L.  ENERO 2000
# -------------------------------------------------------------------------- 
# web: www.microbotica.es                                                    
# mail: info@microbotica.es                                                  
#----------------------------------------------------------------------------
# Para generar la libreria introducirse en el directorio src y ejecutar:
#
#  make 
#
# Para instalar la libreria es necesario ser ROOT y ejecutar alguno de los
# siguientes comandos en el directorio usr:
#
#  make install
#
# Para desinstalar:
#
#  make desinstall
#
# ****************************************************************************
LIBNAME = libcts.so.1.4

#--- Nombre del paquete
PACKNAME= cts-1.4-1

#---- Directorios
INCLUDEDIR = ../include
LIBDIR = ../lib

#---- Compilador
CC = gcc
CFLAGS = -I$(INCLUDEDIR)

#----- Libreria
DEP_BIBLIOTECA = serie.o ascbin.o s19.o bootstrp.o ctclient.o ctnet.o

# ---- Generacion de la libreria
libcts:  $(DEP_BIBLIOTECA)
	 $(CC) -shared -W1,-soname,libcts.so -o $(LIBDIR)/$(LIBNAME) $(DEP_BIBLIOTECA)

.c.o:		
		$(CC) $(CFLAGS) -fPIC -c $<

clean:
	 rm -f $(DEP_BIBLIOTECA) $(LIBDIR)/$(LIBNAME)

install:
	 ./instalar $(PACKNAME)
         
desinstall:
	 ./desinstalar $(PACKNAME)

#--- Dependencias
serie.o    : $(INCLUDEDIR)/serie.h
ascbin.o   : $(INCLUDEDIR)/ascbin.h
bootstrp.o : $(INCLUDEDIR)/serie.h $(INCLUDEDIR)/s19.h $(INCLUDEDIR)/bootstrp.h
s19.o      : $(INCLUDEDIR)/s19.h
ctclient.o : $(INCLUDEDIR)/serie.h $(INCLUDEDIR)/ctclient.h
ctnet.o    : $(INCLUDEDIR)/serie.h 




