X-Git-Url: http://git.tuebingen.mpg.de/?a=blobdiff_plain;f=Makefile.real;h=9ba29774c9d16949cae8a3ae23ea3e01f18b7095;hb=feb3f00938a717061e0b41e76f4c68cdac9a17f7;hp=bc3bf616451eae0a716ffa2d041fc6341630a7a5;hpb=3ea3f8fae5150eb1b718c076071c7ca81563365f;p=paraslash.git diff --git a/Makefile.real b/Makefile.real index bc3bf616..9ba29774 100644 --- a/Makefile.real +++ b/Makefile.real @@ -244,10 +244,15 @@ $(object_dir)/%.cmdline.o: $(cmdline_dir)/%.cmdline.c $(cmdline_dir)/%.cmdline.h @[ -z "$(Q)" ] || echo 'CC $<' $(Q) $(CC) -c -o $@ $(CPPFLAGS) $(CFLAGS) $< -$(dep_dir)/%.d: %.c error2.h | $(dep_dir) $(cmdlist_dir) +# The compiler outputs dependencies either as foo.h or as some_directory/foo.h, +# depending on whether the latter file exists. Since make needs the directory +# part we prefix the dependency as appropriate. +$(dep_dir)/%.d: %.c error2.h | $(dep_dir) @[ -z "$(Q)" ] || echo 'DEP $<' - $(Q) ./depend.sh $(dep_dir) $(object_dir) $(cmdline_dir) \ - $(cmdlist_dir) $(CPPFLAGS) $< > $@ + $(Q) $(CC) $(CPPFLAGS) -MM -MG -MP -MT $@ -MT $(object_dir)/$(*F).o $< \ + | sed -e "s@ \([a-zA-Z0-9_]\{1,\}\.cmdline.h\)@ $(cmdline_dir)/\1@g" \ + -e "s@ \([a-zA-Z0-9_]\{1,\}\.command_list.h\)@ $(cmdlist_dir)/\1@g" \ + -e "s@ \([a-zA-Z0-9_]\{1,\}\.completion.h\)@ $(cmdlist_dir)/\1@g" > $@ para_recv para_afh para_play para_server: LDFLAGS += $(id3tag_ldflags) para_write para_play para_audiod: LDFLAGS += $(ao_ldflags) $(core_audio_ldflags)