TESTPROGS-$(ARCH_X86) += x86/cpuid
TESTPROGS-$(HAVE_MMX) += motion
+HOSTPROGS = costablegen
+
DIRS = alpha arm bfin mlib ppc ps2 sh4 sparc x86
-CLEANFILES = sin_tables.c cos_tables.c costablegen$(HOSTEXESUF) *_tables.h *_tablegen$(HOSTEXESUF)
+CLEANFILES = sin_tables.c cos_tables.c *_tables.h *_tablegen$(HOSTEXESUF)
include $(SUBDIR)../subdir.mak
$(SUBDIR)dct-test$(EXESUF): $(SUBDIR)dctref.o
-$(SUBDIR)costablegen$(HOSTEXESUF): $(SUBDIR)costablegen.c
- $(HOSTCC) $(HOSTCFLAGS) $(HOSTLDFLAGS) -o $@ $< $(HOSTLIBS)
-
$(SUBDIR)cos_tables.c: $(SUBDIR)costablegen$(HOSTEXESUF)
./$< > $@
$(SUBDIR)sin_tables.c: $(SUBDIR)costablegen$(HOSTEXESUF)
./$< sin > $@
-ifeq ($(CONFIG_MPEGAUDIO_HP),yes)
+ifdef CONFIG_MPEGAUDIO_HP
$(SUBDIR)mpegaudio_tablegen$(HOSTEXESUF): HOSTCFLAGS += -DFRAC_BITS=23
else
$(SUBDIR)mpegaudio_tablegen$(HOSTEXESUF): HOSTCFLAGS += -DFRAC_BITS=15
endif
+
$(SUBDIR)%_tablegen$(HOSTEXESUF): $(SUBDIR)%_tablegen.c $(SUBDIR)tableprint.c
$(HOSTCC) $(HOSTCFLAGS) $(HOSTLDFLAGS) -o $@ $^ $(HOSTLIBS)