CC     = gcc -pthread
I2C_CFLAGS = -Wall -DCONFIGURATION=1 -DHOST_INTF_I2C -w
OBJDIR = obj
SRCS   = $(wildcard *.c */*.c)
OBJS   = $(patsubst %.c, %.o,$(SRCS))
OBJSS  = $(patsubst %, $(OBJDIR)/%,$(notdir $(OBJS)))
FLAG   = -g
NAME   = test
TARGET = $(patsubst %.c, %, $(NAME))
INCLUDE= -I./ -I./iso14443 -I./lpcd -I./app

$(TARGET):$(OBJS)
	$(CC) $(INCLUDE) $(I2C_CFLAGS) -o $@ $(addprefix $(OBJDIR)/, $(notdir $^))  $(FLAG)

%.o:%.c
	$(CC) $(INCLUDE) $(I2C_CFLAGS) -o $(OBJDIR)/$(notdir $@) -c $< -g
clean:
	-rm -f  $(OBJSS) $(TARGET)
