uname_s := $(shell uname -s 2>/dev/null || echo "UNKNOWN_OS")
uname_rs := $(shell uname -rs)
cc_version := $(shell $(CC) --version | head -n 1)
-codename := imaginary radiation
+codename := deterministic entropy
+
+GIT_VERSION := $(shell ./GIT-VERSION-GEN git-version.h)
DEBUG_CPPFLAGS += -Wno-sign-compare -g -Wunused -Wundef -W
DEBUG_CPPFLAGS += -Wredundant-decls
CPPFLAGS += -I/usr/local/include
CPPFLAGS += -I$(cmdline_dir)
CPPFLAGS += @osl_cppflags@
-CPPFLAGS += -DGIT_VERSION='"$(GIT_VERSION)"'
man_pages := $(patsubst %, man/man1/%.1, @executables@)
man_pages_in := $(patsubst %, web/%.man.in.html, @executables@)
Q = @
endif
-.PHONY: all clean distclean maintainer-clean install man tarball\
- .FORCE-GIT-VERSION-FILE
-all: @executables@ $(man_pages)
+.PHONY: dep all clean distclean maintainer-clean install man tarball
+all: dep @executables@ $(man_pages)
+dep: $(deps)
man: $(man_pages)
tarball: $(tarball)
-GIT-VERSION-FILE: .FORCE-GIT-VERSION-FILE
- @./GIT-VERSION-GEN GIT-VERSION-FILE
--include GIT-VERSION-FILE
-@executables@: GIT-VERSION-FILE
-
-include $(ggo_dir)/makefile
%_command_list.c: %.cmd
$(man_dir):
mkdir -p $@
+$(object_dir)/spx_common.o: spx_common.c | $(object_dir)
+ @[ -z "$(Q)" ] || echo 'CC $<'
+ $(Q) $(CC) -c -o $@ $(CPPFLAGS) $(DEBUG_CPPFLAGS) @ogg_cppflags@ $<
+
+$(object_dir)/spxdec_filter.o: spxdec_filter.c | $(object_dir)
+ @[ -z "$(Q)" ] || echo 'CC $<'
+ $(Q) $(CC) -c -o $@ $(CPPFLAGS) $(DEBUG_CPPFLAGS) @ogg_cppflags@ $<
+
+$(object_dir)/spx_afh.o: spx_afh.c | $(object_dir)
+ @[ -z "$(Q)" ] || echo 'CC $<'
+ $(Q) $(CC) -c -o $@ $(CPPFLAGS) $(DEBUG_CPPFLAGS) @ogg_cppflags@ $<
+
$(object_dir)/oggdec_filter.o: oggdec_filter.c | $(object_dir)
@[ -z "$(Q)" ] || echo 'CC $<'
- $(Q) $(CC) -c -o $@ $(CPPFLAGS) $(DEBUG_CPPFLAGS) @oggvorbis_cppflags@ $<
+ $(Q) $(CC) -c -o $@ $(CPPFLAGS) $(DEBUG_CPPFLAGS) @ogg_cppflags@ $<
$(object_dir)/ogg_afh.o: ogg_afh.c | $(object_dir)
@[ -z "$(Q)" ] || echo 'CC $<'
- $(Q) $(CC) -c -o $@ $(CPPFLAGS) $(DEBUG_CPPFLAGS) @oggvorbis_cppflags@ $<
+ $(Q) $(CC) -c -o $@ $(CPPFLAGS) $(DEBUG_CPPFLAGS) @ogg_cppflags@ $<
+
+$(object_dir)/ogg_afh_common.o: ogg_afh_common.c | $(object_dir)
+ @[ -z "$(Q)" ] || echo 'CC $<'
+ $(Q) $(CC) -c -o $@ $(CPPFLAGS) $(DEBUG_CPPFLAGS) @ogg_cppflags@ $<
$(object_dir)/mp3dec_filter.o: mp3dec_filter.c | $(object_dir)
@[ -z "$(Q)" ] || echo 'CC $<'
$(object_dir)/%.cmdline.o: $(cmdline_dir)/%.cmdline.c $(cmdline_dir)/%.cmdline.h | $(object_dir)
@[ -z "$(Q)" ] || echo 'CC $<'
- $(Q) $(CC) -c $(CPPFLAGS) -o $@ $<
+ $(Q) $(CC) -c $(CPPFLAGS) -Wno-unused-function -o $@ $<
$(object_dir)/%.o: %.c | $(object_dir)
@[ -z "$(Q)" ] || echo 'CC $<'
$(audiod_objs) $(audioc_objs) $(fade_objs) $(server_objs) \
$(write_objs) $(afh_objs)
+deps := $(all_objs:.o=.d)
+
ifeq ($(findstring clean, $(MAKECMDGOALS)),)
--include $(all_objs:.o=.d)
+-include $(deps)
endif
para_recv: $(recv_objs)
git archive --format=tar --prefix=$(tarball_pfx)/ HEAD \
| tar --delete $(tarball_delete) > $(tarball_pfx).tar
mkdir -p $(tarball_pfx)/$(cmdline_dir)
- echo $(GIT_VERSION) > $(tarball_pfx)/VERSION
+ ./GIT-VERSION-GEN > $(tarball_pfx)/VERSION
cp -r $(autocrap) $(tarball_pfx)
cp -r $(cmdline_generated) $(tarball_pfx)/$(cmdline_dir)
tar rf $(tarball_pfx).tar $(tarball_pfx)/*