EXEC = zlogtrace | |
CFLAGS += -I./localfs_save/ | |
CFLAGS += -I./localfs_save/config | |
CFLAGS += -I./netport_rserial | |
CFLAGS += -g | |
SRCS = $(wildcard *.c ./localfs_save/*.c ./netcom_rserial/*.c ) | |
OBJS = $(patsubst %.c,%.o, $(SRCS)) | |
LDLIBS += -lpthread | |
LDLIBS += -lm | |
all: $(EXEC) | |
$(EXEC): $(OBJS) | |
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ -Wl,--start-group $(LDLIBS) $(LDLIBS_$@) -Wl,--end-group | |
@cp $@ $@.elf | |
clean: | |
-rm -f $(EXEC) $(OBJS) *.elf *.gdb *.o |