2018-04-25 14:57:01 +08:00
|
|
|
objects = log_sys.o \
|
2018-05-08 10:58:44 +08:00
|
|
|
strutils.o \
|
2018-05-08 11:03:53 +08:00
|
|
|
cmdutils.o \
|
|
|
|
fsutils.o
|
2018-04-25 10:19:46 +08:00
|
|
|
|
|
|
|
all: check_obj $(objects)
|
|
|
|
check_obj:
|
|
|
|
@if [ ! -d $(BUILDDIR)/common/obj ]; then \
|
|
|
|
mkdir -p $(BUILDDIR)/common/obj/; \
|
|
|
|
fi
|
|
|
|
|
|
|
|
$(objects):%.o:%.c
|
|
|
|
$(CC) -c $(CFLAGS) $(INCLUDE) $< -o $(BUILDDIR)/common/obj/$@
|
|
|
|
|
|
|
|
.PHONY:clean
|
|
|
|
clean:
|
|
|
|
@echo "Clean objects and binaries"
|
|
|
|
@if [ -d $(BUILDDIR)/common/obj ]; then \
|
|
|
|
find $(BUILDDIR)/common/obj -name "*.o" -exec $(RM) {} \; 2>&1 || exit 0; \
|
|
|
|
fi
|
|
|
|
@if [ -d $(BUILDDIR)/common/obj ]; then \
|
|
|
|
$(RM) -r $(BUILDDIR)/common/obj ; \
|
|
|
|
fi
|