this is my makefile and mu dictionary includes header, log, obj, parser, lisod.c,and i don't think i forget some file some file need to be output but it doesn't appear . my error looks like make: *** No rule to make target 'obj/logging.o', needed by 'liso_server'. Stop.
CC=gcc
CFLAGS= -g -I.
_DEPS = parse.h y.tab.h logging.h
_OBJ =logging.o parse.o y.tab.o lex.yy.o
FLAGS = -g -Wall
PARSE_DIR = parser
LOG_DIR = log
OBJ_DIR = obj
INCLUDE_DIR = header
DEPS = $(patsubst %, $(INCLUDE_DIR)/%, $(_DEPS))
OBJ = $(patsubst %,$(OBJ_DIR)/%, $(_OBJ))
default: all
all: liso_server
$(PARSE_DIR)/lex.yy.c: $(PARSE_DIR)/lexer.l
flex -o $@ $^
$(PARSE_DIR)/y.tab.c: $(PARSE_DIR)/parser.y
yacc -d $^
mv y.tab.h $(INCLUDE_DIR)/
$(OBJ_DIR)/%.o: $(PARSER_DIR)/%.c $(LOG_DIR)/%.c $(DEPS)
$(CC) $(FLAGS) -c -o $@ $< $(CFLAGS)
liso_server: $(OBJ)
$(CC) -o $@ $^ $(CFLAGS)
.PHONY: clean
clean:
rm -f $(OBJ_DIR)/*.o
rm $(PARSE_DIR)/lex.yy.* $(PARSE_DIR)/y.tab.* $(INCLUDE_DIR)/y.tab.*
rm liso_server