EXEC		= ipmitool

CFLAGS		:= -Os -mcpu=cortex-m3 -mthumb
LDFLAGS		:= -mcpu=cortex-m3 -mthumb -L$(INSTALL_ROOT)/A2F/root/usr/lib



CC	= $(CROSS_COMPILE_APPS)gcc

#source
SRC	= src/ipmitool.c
SRC += src/plugins/ipmi_intf.c
SRC += lib/log.c
SRC += lib/helper.c
SRC += lib/ipmi_string.c
SRC += lib/ipmi_main.c
SRC += lib/ipmi_raw.c

#SRC += lib/ipmi_delloem.c
#SRC += lib/ipmi_oem.c
#SRC += lib/ipmi_sdr.c
#SRC += lib/ipmi_sel.c





#SRC += $(wildcard ./lib/*.c) 

#incldue
CFLAGS	+= -I$(INSTALL_ROOT)/A2F/root/usr/include
CFLAGS	+= -I ./include



#object
OBJS	= $(SRC:%.o=%.c)

$(EXEC): $(OBJS)
	$(CC) $(LDFLAGS) $(CFLAGS) -o $@ $^ $(LIBS) -lpthread
	rm -f *.o

clean:
	OBJS	= $(SRC:%.o=%.c)
	rm -rf $(EXEC) $(OBJS)


