# ESDK the makefile setting file - chenwg@20131014
# you can modify "PC = 1" such as "MIPS = 1" "ARM = 1"
TOPDIR := .
BINDIR := $(TOPDIR)/bin
INCDIR := $(TOPDIR)/inc
EXCLUDEDIRS := tools
SRCS := $(shell find $(TOPDIR) -name "*.c")
OBJS := $(SRCS:%.c=%.o)
EXE := test
CLEAN_FILE := $(shell find $(TOPDIR) -name "*.o")
CLEAN_FILE += $(shell find $(TOPDIR) -name "*~")
CLEAN_FILE += $(EXE)
Q=@
E=echo
ifeq ($(V),1)
Q=
E=true
endif
LDFLAGS :=
LIBS += -pthread -lpthread
CFLAGS += -m32 -I$(INCDIR) -DCONFIG_OS_LINUX
CC := gcc
all: $(OBJS)
$(Q)$(CC) $(LDFLAGS) -o $(EXE) $(OBJS) $(LIBS)
@$(E) " LD " $(EXE)
%.o: %.c
$(Q)$(CC) $(CFLAGS) -c -o $@ $<
@$(E) " CC " $@
clean:
$(Q)rm -rf $(CLEAN_FILE)
@echo "rm *.o *~ $(EXE)"