include ../../Makefile.project target = mergeImage CC = gcc -m32 LIB = spi_encrypt.o CFLAGS = -O2 -Wall -Werror CINCLUDE = -I../../drivers/include/ -I../../drivers/module_include/ -I../../mergedir/option #ifeq ($(CONFIG_VERSION),release) # CFLAGS += -DRELEASE_VER #endif .PHONY: all clean all: mkdir_ojbs $(target) source += $(wildcard *.c) objs := $(source:%.c=objs/%.o) $(target): $(objs) @echo Building $@ $(CC) -o $@ $(LDFLAGS) $^ $(LIB) # one pass sequence objs/%.o : %.c @echo Compiling $< @$(CC) $(CFLAGS) $(CINCLUDE) -MMD -c -o $@ $< clean: rmdir_objs @rm -f $(target) mkdir_ojbs: @if [ ! -d "objs" ] ; then mkdir objs; fi rmdir_objs: @if [ -d "objs" ]; then rm -rf objs; fi -include $(source:%.c=objs/%.d)