rcdir = .   
# Change these if necessary
CC = $(CROSS_COMPILE)gcc 
CPP = $(CROSS_COMPILE)gcc -E

LIBS = -lgpiod -lusb-1.0 
CFLAGS = -I ./
#---------------------------------------------
PROGNAME = switchserialmode
#---------------------------------------------

OBJECTS = $(PROGNAME).o
all:    $(PROGNAME)

$(PROGNAME): $(OBJECTS) 
	$(CC) -o $@ $(CFLAGS) $(LDFLAGS) $(OBJECTS) $(LIBS)

%.o: %.c
	$(CC) $(CFLAGS) -c $<  -o $(basename $<).o

clean:
	rm -f $(OBJECTS) $(PROGNAME) core *.gdb *.o *~
