Fix incorrect pattern rules in Makefile.

- Having more than one rule in a pattern rule means that both of those files
  are created at the same time with the rule. This only worked for debug,
  because debug build was never done in the same invocation as release build.
This commit is contained in:
Ari Koivula 2015-07-29 16:54:32 +03:00
parent 1c27f67963
commit 24b3306325

View file

@ -254,15 +254,28 @@ $(DEBUG): $(DEBUG_OBJS)
$(TESTS): $(TESTS_OBJS)
$(LD) $^ $(LDFLAGS) $(LIBS) -o $@
# Hopefully the ASM code is PIC. If not, we have to disable for the .so and .dylib.
%.o %_debug.o %.lo %_debug.lo: %.asm Makefile
%.o: %.asm Makefile
$(AS) $(ASFLAGS) -o $@ $<
%_debug.o: %.asm Makefile
$(AS) $(ASFLAGS) -o $@ $<
%.o %_debug.o: %.c Makefile
# Hopefully the ASM code is PIC. If not, we have to disable for the .so and .dylib.
%.lo: %.asm Makefile
$(AS) $(ASFLAGS) -o $@ $<
%_debug.lo: %.asm Makefile
$(AS) $(ASFLAGS) -o $@ $<
%.o: %.c Makefile
$(CC) $(CFLAGS) $(EXTRA_FLAGS) -MMD -MP -c $< -o $@
%_debug.o: %.c Makefile
$(CC) $(CFLAGS) $(EXTRA_FLAGS) -MMD -MP -c $< -o $@
%.lo %_debug.lo: %.c Makefile
%.lo: %.c Makefile
$(CC) -fpic $(CFLAGS) $(EXTRA_FLAGS) -MMD -MP -c $< -o $@
%_debug.lo: %.c Makefile
$(CC) -fpic $(CFLAGS) $(EXTRA_FLAGS) -MMD -MP -c $< -o $@
kvazaar.pc: kvazaar.pc.in Makefile
sed -e "s;@prefix@;$(PREFIX);" -e "s;@libdir@;$(LIBDIR);" \