MXC-A36-Demo/MCU/components/modules/EasyLogger-2.2.0/demo/os/linux/Makefile

24 lines
693 B
Makefile
Raw Normal View History

CC = cc
ROOTPATH=../../..
INCLUDE = -I./easylogger/inc -I./easylogger/plugins/ -I$(ROOTPATH)/easylogger/plugins/ -I$(ROOTPATH)/easylogger/inc
LIB=-lpthread
OBJ += $(patsubst %.c, %.o, $(wildcard *.c))
OBJ += $(patsubst %.c, %.o, $(wildcard $(ROOTPATH)/easylogger/src/*.c))
OBJ += $(patsubst %.c, %.o, $(wildcard $(ROOTPATH)/easylogger/plugins/file/elog_file.c))
OBJ += $(patsubst %.c, %.o, $(wildcard easylogger/port/*.c))
OBJ += $(patsubst %.c, %.o, $(wildcard easylogger/plugins/file/*.c))
CFLAGS = -O0 -g3 -Wall
target = EasyLoggerLinuxDemo
all:$(OBJ)
$(CC) out/*.o -o $(target) $(LIB)
mv $(target) out
%.o:%.c
$(CC) $(CFLAGS) -c $< -o $@ $(INCLUDE)
mv $@ out
clean:
rm -rf out/*