#------- Comment/uncomment the following line to enable/disable debugging------
#DEBUG = y


#---------------------- Generic Library variables -----------------------------

##you can modify the following variables

# Versions for the library
LIB_VER_MAJOR = 1
LIB_VER_MINOR = 0

# Name of the target.
# just give the generic name of the module..for e.g:libfwall
# all else will be computed including shared object name etc
LIBRARY_NAME=libminilzo

#------------------------------------------------------------------------------


#---------------------- Compute TOPDIR and include Rules file -----------------
ifndef TOPDIR
TOPDIR  := $(shell cd ../../../../../..; pwd)
endif
include $(TOPDIR)/development/rules/Rules.make.libs
#------------------------------------------------------------------------------


#---------------------- Change according to your files ------------------------
SRC		=  interface.c minilzo.c 
CFLAGS	+= -I$(TOPDIR)/development/common/include/adviser

#------------------------------------------------------------------------------



#--------------WARNING : Donot Modify anything below this line ----------------

#--------------WARNING : Donot Modify anything below this line ----------------

all:   $(LIB_LINKERNAME)

$(LIB_ARCHIVE_NAME): $(OBJ)
	$(AR) $(ARFLAGS) $@ $^

$(LIB_LINKERNAME):$(LIB_REALNAME)
	ln -sf $(LIB_REALNAME) $(LIB_LINKERNAME)


$(LIB_REALNAME):$(LIB_ARCHIVE_NAME)
	$(CC) -shared -Wl,-soname,$(LIB_SONAME) -o $(LIB_REALNAME) \
	-Wl,--whole-archive $(LIB_ARCHIVE_NAME) -Wl,--no-whole-archive -lc

clean:
	rm -f  $(OBJ) *~ core .depend $(DFILES) $(TARGET) *.lcd
	rm -f $(LIB_LINKERNAME) $(LIB_COMMON_LIBNAME) $(LIB_REALNAME)

lint:
	$(LINT) $(LFLAGS) $(SRC)

#for the doxygen documentation 
docs:
	-mkdir -p documentation/html
	@cat ./templateFooter.html|sed "s/__TIMESTAMP__/`date`/" > ./documentation/html/defaultFooter.html
	@doxygen 

include $(TOPDIR)/development/rules/Rules.make.libs-install

-include $(DFILES)
#----------------------------------------------------------------------------------------
