diff Makefile @ 35913:635f18a8e27d

build: Compile all codec-cfg* host tools with one generic rule.
author diego
date Tue, 19 Mar 2013 10:42:23 +0000
parents 9914889b8b68
children 209180129a45
line wrap: on
line diff
--- a/Makefile	Tue Mar 19 10:42:19 2013 +0000
+++ b/Makefile	Tue Mar 19 10:42:23 2013 +0000
@@ -766,8 +766,10 @@
 mencoder$(EXESUF) mplayer$(EXESUF):
 	$(CC) -o $@ $^ $(EXTRALIBS)
 
-codec-cfg$(EXESUF): codec-cfg.c codec-cfg.h help_mp.h
-	$(HOST_CC) -O -DCODECS2HTML -I. -Iffmpeg -o $@ $<
+codec-cfg-test$(EXESUF): HOSTCFLAGS := $(HOSTCFLAGS) -DTESTING
+codec-cfg$(EXESUF) codecs2html$(EXESUF):  HOSTCFLAGS := $(HOSTCFLAGS) -DCODECS2HTML
+codec-cfg$(EXESUF) codec-cfg-test$(EXESUF) codecs2html$(EXESUF): codec-cfg.c codec-cfg.h help_mp.h
+	$(HOST_CC) $(HOSTCFLAGS) -o $@ $<
 
 codecs.conf.h: codec-cfg$(EXESUF) etc/codecs.conf
 	./$^ > $@
@@ -839,7 +841,7 @@
 ###### dependency declarations / specific CFLAGS ######
 
 # Make sure all generated header files are created.
-codec-cfg.o: codecs.conf.h
+codec-cfg.o codec-cfg-test$(EXESUF): codecs.conf.h
 $(DEP_FILES) $(MENCODER_DEPS) $(MPLAYER_DEPS): help_mp.h
 mpcommon.o osdep/mplayer-rc.o gui/dialog/about.o gui/win32/gui.o: version.h
 
@@ -1009,12 +1011,6 @@
 
 TEST_OBJS = mp_msg.o mp_fifo.o osdep/$(GETCH) osdep/$(TIMER) -ltermcap -lm
 
-codec-cfg-test$(EXESUF): codec-cfg.c codecs.conf.h help_mp.h
-	$(CC) -I. -Iffmpeg -DTESTING -o $@ $^
-
-codecs2html$(EXESUF): codec-cfg.c help_mp.h
-	$(CC) -I. -Iffmpeg -DCODECS2HTML -o $@ $^
-
 libvo/aspecttest$(EXESUF): libvo/aspect.o libvo/geometry.o $(TEST_OBJS)
 
 LOADER_TEST_OBJS = $(SRCS_WIN32_EMULATION:.c=.o) $(SRCS_QTX_EMULATION:.S=.o) ffmpeg/libavutil/libavutil.a osdep/mmap_anon.o cpudetect.o path.o $(TEST_OBJS)