EXEC		= authlicense

CFLAGS		:= -Os -mcpu=cortex-m3 -mthumb
LDFLAGS		:= -mcpu=cortex-m3 -mthumb -L$(INSTALL_ROOT)/A2F/root/usr/lib
#BUILD_TIME 	= $(shell date +"%Y-%m-%d %H:%M:%S")



CC	= $(CROSS_COMPILE_APPS)gcc

#source
SRC	= AuthLicense_main.c
SRC += AuthLicense.c
SRC += MD5.c
SRC += md5c.c

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

#incldue
CFLAGS	+= -I$(INSTALL_ROOT)/A2F/root/usr/include
CFLAGS	+= -I ./
CFLAGS	+= -I ../common_include
CFLAGS	+= -I ../driver
CFLAGS	+= -I ../hal_api
CFLAGS	+= -I ../driver/STM32F4xx_HAL_Driver
CFLAGS	+= -I ../driver/STM32F4xx_HAL_Driver/Inc
CFLAGS	+= -I ../driver/STM32F4xx_HAL_Driver/Inc/Legacy


#library

#sub-directory
#SUBDIR 	= ./sensor






$(EXEC): $(SRC)
	#echo $(BUILD_TIME)
	$(CC) $(LDFLAGS) $(CFLAGS) -o $@ $^ $(LIBS) -lpthread


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

clean:
	rm -f $(EXEC) $(OBJS)
	rm -f *.gdb 

