|
|
|
@ -11,9 +11,11 @@ debug: |
|
|
|
|
|
|
|
dep: .depend |
|
|
|
|
|
|
|
BUILD_TEST_ALTS = fix_frame_channel_layout.h |
|
|
|
|
|
|
|
clean: |
|
|
|
rm -f $(OBJS) $(TARGET) $(LIBSRCS) $(DAEMONSRCS) $(MANS) $(ADD_CLEAN) .depend core core.* |
|
|
|
rm -f fix_frame_channel_layout.h fix_frame_channel_layout-test.[co] *.strhash.c $(HASHSRCS) |
|
|
|
rm -f $(BUILD_TEST_ALTS) $(BUILD_TEST_ALTS:.h=-test{.c,}) *.strhash.c $(HASHSRCS) |
|
|
|
|
|
|
|
.depend: $(SRCS) $(LIBSRCS) $(DAEMONSRCS) Makefile |
|
|
|
$(CC) $(CFLAGS) -M $(SRCS) $(LIBSRCS) $(DAEMONSRCS) | sed -e 's/:/ .depend:/' > .depend |
|
|
|
@ -44,20 +46,20 @@ resample.c: fix_frame_channel_layout.h |
|
|
|
%.strhash.c: %.c ../utils/const_str_hash |
|
|
|
../utils/const_str_hash < $< > $@ |
|
|
|
|
|
|
|
fix_frame_channel_layout.h: ../lib/fix_frame_channel_layout-* |
|
|
|
$(BUILD_TEST_ALTS): ../lib/$(@:.h=-*) |
|
|
|
echo "Looking for usable alternative for $@"; \ |
|
|
|
rm -f fix_frame_channel_layout-test.[co]; \ |
|
|
|
ln -s ../lib/fix_frame_channel_layout-test.c; \ |
|
|
|
for x in ../lib/fix_frame_channel_layout-*.h; do \ |
|
|
|
rm -f $(@:.h=-test{.c,}); \ |
|
|
|
ln -s ../lib/$(@:.h=-test.c); \ |
|
|
|
for x in ../lib/$(@:.h=-*.h); do \ |
|
|
|
echo "Trying build with $$x"; \ |
|
|
|
rm -f "$@"; \ |
|
|
|
echo '/******** GENERATED FILE ********/' > "$@"; \ |
|
|
|
cat "$$x" >> "$@"; \ |
|
|
|
$(MAKE) fix_frame_channel_layout-test.o && break; \ |
|
|
|
$(MAKE) $(@:.h=-test) && break; \ |
|
|
|
echo "Failed build with $$x"; \ |
|
|
|
rm -f "$@"; \ |
|
|
|
done; \ |
|
|
|
rm -f fix_frame_channel_layout-test.[co]; \ |
|
|
|
rm -f $(@:.h=-test{.c,}); \ |
|
|
|
test -f "$@" |
|
|
|
|
|
|
|
.PHONY: all debug dep clean install |