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


#---------------------- Generic Library variables -----------------------------
# Versions for the library
LIB_VER_MAJOR	= 1
LIB_VER_MINOR	= 0

LIBRARY_NAME	= libinihandler
#------------------------------------------------------------------------------


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


#---------------------- Change according to your files ------------------------
# Source files
SRC		=  ./iniparse.c
SRC		+=  ./hashtable.c
SRC		+=  ./hashfns.c
SRC		+=  ./rexstr.c

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

CFLAGS += -fno-strict-aliasing
CFLAGS += -I .


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

all:   $(LIB_LINKERNAME)

docs:
	doxygen

$(LIB_ARCHIVE_NAME): $(SRC:.c=.o)
	$(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 $(INCL_IPMI_LIB) $(INCL_INILIB)

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

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


ifeq (.depend,$(wildcard .depend))
include .depend
endif
#------------------------------------------------------------------------------
