Commit 659aa20e authored by Mans Rullgard's avatar Mans Rullgard

build: improve rules for test programs

This generates dependencies for the *-test.o files ensuring
rebuilds when necessary.
Signed-off-by: 's avatarMans Rullgard <mans@mansr.com>
parent bc877faf
......@@ -11,16 +11,17 @@ all-$(CONFIG_STATIC): $(SUBDIR)$(LIBNAME)
all-$(CONFIG_SHARED): $(SUBDIR)$(SLIBNAME)
$(SUBDIR)%-test.o: $(SUBDIR)%-test.c
$(CC) $(CPPFLAGS) $(CFLAGS) -DTEST -c $(CC_O) $^
$(COMPILE_C)
$(SUBDIR)%-test.o: $(SUBDIR)%.c
$(CC) $(CPPFLAGS) $(CFLAGS) -DTEST -c $(CC_O) $^
$(COMPILE_C)
$(SUBDIR)x86/%.o: $(SUBDIR)x86/%.asm
$(YASMDEP) $(YASMFLAGS) -I $(<D)/ -M -o $@ $< > $(@:.o=.d)
$(YASM) $(YASMFLAGS) -I $(<D)/ -o $@ $<
$(OBJS) $(SUBDIR)%.ho $(SUBDIR)%-test.o $(TESTOBJS): CPPFLAGS += -DHAVE_AV_CONFIG_H
$(OBJS) $(SUBDIR)%.ho $(TESTOBJS): CPPFLAGS += -DHAVE_AV_CONFIG_H
$(TESTOBJS): CPPFLAGS += -DTEST
$(SUBDIR)$(LIBNAME): $(OBJS)
$(RM) $@
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment