[MPlayer-cvslog] r36008 - trunk/Makefile
diego
subversion at mplayerhq.hu
Tue Mar 19 11:42:26 CET 2013
Author: diego
Date: Tue Mar 19 11:42:26 2013
New Revision: 36008
Log:
build: Split object files from link libraries in generic executable rule.
This avoids a host of problems when GNU Make starts mucking with -l flags.
Modified:
trunk/Makefile
Modified: trunk/Makefile
==============================================================================
--- trunk/Makefile Tue Mar 19 11:42:23 2013 (r36007)
+++ trunk/Makefile Tue Mar 19 11:42:26 2013 (r36008)
@@ -797,7 +797,7 @@ version.h: version.sh $(wildcard .svn/en
./$< `$(CC) -dumpversion`
%$(EXESUF): %.c
- $(CC) $(CC_DEPFLAGS) $(CFLAGS) -o $@ $^
+ $(CC) $(CC_DEPFLAGS) $(CFLAGS) -o $@ $^ $(LIBS)
%.ho: %.h
$(CC) $(CFLAGS) -Wno-unused -c -o $@ -x c $<
@@ -1009,11 +1009,13 @@ endif
###### tests / tools #######
-TEST_OBJS = mp_msg.o mp_fifo.o osdep/$(GETCH) osdep/$(TIMER) -ltermcap -lm
+MP_MSG_LIBS = -ltermcap -lm
+MP_MSG_OBJS = mp_msg.o mp_fifo.o osdep/$(GETCH) osdep/$(TIMER)
-libvo/aspecttest$(EXESUF): libvo/aspect.o libvo/geometry.o $(TEST_OBJS)
+libvo/aspecttest$(EXESUF): libvo/aspect.o libvo/geometry.o $(MP_MSG_OBJS)
+libvo/aspecttest$(EXESUF): LIBS = $(MP_MSG_LIBS)
-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)
+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 $(MP_MSG_OBJS)
loader/qtx/list$(EXESUF) loader/qtx/qtxload$(EXESUF): CFLAGS += -g
loader/qtx/list$(EXESUF) loader/qtx/qtxload$(EXESUF): $(LOADER_TEST_OBJS)
@@ -1044,12 +1046,13 @@ toolsclean:
-rm -f $(call ADD_ALL_EXESUFS,$(ALLTOOLS))
-rm -f TOOLS/realcodecs/*.so.6.0
-TOOLS/bmovl-test$(EXESUF): -lSDL_image
+TOOLS/bmovl-test$(EXESUF): LIBS = -lSDL_image
TOOLS/subrip$(EXESUF): path.o sub/vobsub.o sub/spudec.o sub/unrar_exec.o \
- ffmpeg/libswscale/libswscale.a ffmpeg/libavutil/libavutil.a $(TEST_OBJS)
+ ffmpeg/libswscale/libswscale.a ffmpeg/libavutil/libavutil.a $(MP_MSG_OBJS)
+TOOLS/subrip$(EXESUF): LIBS = $(MP_MSG_LIBS)
-TOOLS/vfw2menc$(EXESUF): -lwinmm -lole32
+TOOLS/vfw2menc$(EXESUF): LIBS = -lwinmm -lole32
mplayer-nomain.o: mplayer.c
$(CC) $(CFLAGS) -DDISABLE_MAIN -c -o $@ $<
More information about the MPlayer-cvslog
mailing list