X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=Makefile.real;h=b60c56984e4fd707378a3f462d2d522825de5f45;hp=3631a5c9f47569c48d38df3877cea286a12e468b;hb=3d3a2f50a05501cf27f1155629799953f952bd4b;hpb=8eb77a20423c3dcc44c4584a082e981391272cb2 diff --git a/Makefile.real b/Makefile.real index 3631a5c9..b60c5698 100644 --- a/Makefile.real +++ b/Makefile.real @@ -32,12 +32,15 @@ m4depdir := $(build_dir)/m4deps lls_suite_dir := $(build_dir)/lls lls_m4_dir := m4/lls test_dir := t +yy_src_dir = yy +yy_build_dir = $(build_dir)/yy # sort removes duplicate words, which is all we need here all_objs := $(sort $(recv_objs) $(filter_objs) $(client_objs) $(gui_objs) \ $(audiod_objs) $(audioc_objs) $(mixer_objs) $(server_objs) \ $(write_objs) $(afh_objs) $(play_objs)) deps := $(addprefix $(dep_dir)/, $(all_objs:.o=.d)) +deps += $(addprefix $(dep_dir)/, mp.bison.d mp.flex.d) afh_objs += afh.lsg.o audioc_objs += audioc.lsg.o @@ -57,6 +60,12 @@ suites := $(addprefix $(lls_suite_dir)/, $(cmd_suites) $(executables)) m4_lls_deps := $(addsuffix .m4d, $(suites)) lsg_h := $(addsuffix .lsg.h, $(suites)) +# flex/bison objects and headers are only needed if para_server is built +ifeq ("$(findstring server, $(executables))", "server") + server_objs += mp.flex.o mp.bison.o + yy_h := $(yy_build_dir)/mp.bison.h +endif + # now prefix all objects with object dir recv_objs := $(addprefix $(object_dir)/, $(recv_objs)) filter_objs := $(addprefix $(object_dir)/, $(filter_objs)) @@ -85,12 +94,14 @@ man: $(man_pages) include $(lls_m4_dir)/makefile include $(test_dir)/makefile.test +include $(yy_src_dir)/makefile ifeq ($(findstring clean, $(MAKECMDGOALS)),) -include $(deps) -include $(m4_lls_deps) endif -$(object_dir) $(man_dir) $(dep_dir) $(m4depdir) $(lls_suite_dir): +$(object_dir) $(man_dir) $(dep_dir) $(m4depdir) $(lls_suite_dir) \ + $(yy_build_dir): $(Q) $(MKDIR_P) $@ CPPFLAGS += -DBINDIR='"$(bindir)"' @@ -101,6 +112,7 @@ CPPFLAGS += -DUNAME_RS='"$(uname_rs)"' CPPFLAGS += -DCC_VERSION='"$(cc_version)"' CPPFLAGS += -I/usr/local/include CPPFLAGS += -I$(lls_suite_dir) +CPPFLAGS += -I$(yy_build_dir) CPPFLAGS += $(lopsub_cppflags) STRICT_CFLAGS += -fno-strict-aliasing @@ -234,7 +246,7 @@ $(object_dir)/mm.o \ $(object_dir)/compress_filter.o: CFLAGS += -O3 -$(object_dir)/%.o: %.c | $(object_dir) $(dep_dir) $(lsg_h) +$(object_dir)/%.o: %.c | $(object_dir) $(dep_dir) $(lsg_h) $(yy_h) @[ -z "$(Q)" ] || echo 'CC $<' $(Q) $(CC) -c -o $@ -MMD -MF $(dep_dir)/$(*F).d -MT $@ $(CPPFLAGS) \ $(STRICT_CFLAGS) $(CFLAGS) $<