Version 2 moods.
[paraslash.git] / yy / makefile
1 .PRECIOUS: $(yy_build_dir)/%.flex.c $(yy_build_dir)/%.bison.c \
2 $(yy_build_dir)/%.bison.h
3
4 $(yy_build_dir)/%.flex.c: $(yy_src_dir)/%.lex | $(yy_build_dir)
5 @[ -z "$(Q)" ] || echo 'FLEX $<'
6 @$(FLEX) -o $@ $<
7
8 $(yy_build_dir)/%.bison.c $(yy_build_dir)/%.bison.h: $(yy_src_dir)/%.y \
9 | $(yy_build_dir)
10 @[ -z "$(Q)" ] || echo 'BISON $<'
11 @$(BISON) --defines=$(yy_build_dir)/$(notdir $(<:.y=.bison.h)) \
12 --output=$(yy_build_dir)/$(notdir $(<:.y=.bison.c)) $<
13
14 $(object_dir)/%.o: $(yy_build_dir)/%.c | $(object_dir)
15 @[ -z "$(Q)" ] || echo 'CC $<'
16 @$(Q) $(CC) -g -c -o $@ $(CPPFLAGS) -MMD -MF $(dep_dir)/$(*F).d \
17 -MT $@ -iquote . -Wno-unused-macros $<