CC  = mipsel-openwrt-linux-gcc

all: UNROBOT_pwm_test

DEBUG = -O3 -g0

COMMON_SOURCES =  UNROBOT_pwm_test.c jz47xx_gpio.c jz47xx_mmap.c

H_SOURCES = jz47xx_gpio.h jz47xx_mmap.h

INCLUDE = -I.

WARNINGS= -Wcast-align -Wpacked -Wpadded -Wall

CCFLAGS = ${INCLUDE} ${DEBUG} ${WARNINGS} 

LDFLAGS =

COMMON_OBJECTS = $(COMMON_SOURCES:.cpp=.o)


ADCw	    : $(COMMON_OBJECTS) ram_test.o
	$(CC)  $(LDFLAGS) $(COMMON_OBJECTS) ram_test.o -o ram_test


.c.o:
	$(CC) -c $(CCFLAGS) $< -o $@

clean: 
	rm -f *.o ram_test ${EXEC} *~ ram_test

indent:
	indent -bad -bap -nbc -bl -nce -i2 --no-tabs --line-length120 $(COMMON_SOURCES) $(H_SOURCES)
