
CFLAGS = -Wall -ggdb -I../kernel

AS		= $(CROSS_COMPILE)as
LD		= $(CROSS_COMPILE)ld
CC		= $(CROSS_COMPILE)gcc
CPP		= $(CC) -E
AR		= $(CROSS_COMPILE)ar
NM		= $(CROSS_COMPILE)nm
STRIP		= $(CROSS_COMPILE)strip
OBJCOPY		= $(CROSS_COMPILE)objcopy
OBJDUMP		= $(CROSS_COMPILE)objdump

ALL = rrcmd flip fpga_loader libfpga_loader.so 

fpga_loader: fpga_loader.o rr_io.o gpio.o
	$(CC) $(CFLAGS) $^ -o $@ 

libfpga_loader.so: rr_io.o gpio.o 
	$(CC) -shared -o $@ $^ 

all: $(ALL)

clean:
	rm -f $(ALL) *.o *~
