1 #CROSS_COMPILE ?= arm-linux-gnueabihf-
2 CC = $(CROSS_COMPILE)gcc
4 CFLAGS = -Wall -O2 -Wextra
12 SRC = $(shell find . -name \*.c)
13 OBJS = ${SRC:%.c=${OBJDIR}/%.o}
18 @echo "-- compiling" $<
19 @$(CC) -MMD -MP -MF ${OBJDIR}/$*.d $(CFLAGS) $< -c -o $@ -I$(INCLUDES)
22 @echo "Linking $@ ..."
23 @$(CC) $(LDFLAGS) -o $@ $(OBJS)
28 find ${OBJDIR} -name "*.o" -exec rm {} \;
29 find ${OBJDIR} -name "*.d" -exec rm {} \;