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

APPDIR := $(INSTALL_ROOT)/projects/gd32450i-eval/app

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

#library

SRC = $(wildcard ./*.c)

OBJS = $(patsubst %.c,%.o,$(SRC))


hal_api:
	echo SRC=$(SRC)
	echo OBJS=$(OBJS)
	$(CC) $(LDFLAGS) $(CFLAGS) -c $(SRC) 


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


