CC =xscale_be-gcc
AR =xscale_be-ar
RM =/bin/rm -f
CFLAGS = -DDEBUG

all: libredboot.a rbctest.c rbcdump.c rbcrm.c rbcswlock.c setswid.c setswid_flag.c
	$(CC) rbcdump.c -lredboot -L. -o rbcdump
	$(CC) rbctest.c -lredboot -L. -o rbctest
	$(CC) rbcrm.c -lredboot -L. -o rbcrm
	$(CC) rbcswlock.c -lredboot -L. -o rbcswlock
	$(CC) setswid.c -lredboot -L. -o setswid
	$(CC) setswid_flag.c -lredboot -L. -o setswid_flag
	$(CC) rbc_getMAC.c -lredboot -L. -o rbc_getMAC

libredboot.a: redboot_config.c
	$(CC) redboot_config.c -c $(CFLAGS)
	$(AR) crv libredboot.a redboot_config.o

clean:
	$(RM) rbcswlock rbctest rbcdump rbcrm libredboot.a redboot_config.o setswid setswid_flag rbc_getMAC
