changeset 19511:854cfbd1a952

Redundancy removal part III: Unify LDFLAGS handling some more.
author diego
date Thu, 24 Aug 2006 00:21:47 +0000
parents 1544ca347324
children cefd8333eeea
files vidix/drivers/Makefile
diffstat 1 files changed, 10 insertions(+), 22 deletions(-) [+]
line wrap: on
line diff
--- a/vidix/drivers/Makefile	Thu Aug 24 00:16:11 2006 +0000
+++ b/vidix/drivers/Makefile	Thu Aug 24 00:21:47 2006 +0000
@@ -5,26 +5,14 @@
 BINDIR = $(LIBDIR)/mplayer/vidix
 
 VIDIX_LIBS = -L../../libdha -ldha
+VIDIX_LIBS_M = $(VIDIX_LIBS) -lm
+VIDIX_LIBS_X = $(VIDIX_LIBS_M) $(X_LIB)
 VIDIX_CFLAGS=-fPIC -I. -I.. $(OPTFLAGS)
 
-CYBERBLADE_LIBS=$(VIDIX_LIBS) -lm
-
-RADEON_LIBS=$(VIDIX_LIBS) -lm $(X_LIB)
-
-RAGE128_LIBS=$(VIDIX_LIBS) -lm $(X_LIB)
 RAGE128_CFLAGS=$(VIDIX_CFLAGS) -DRAGE128
 
-MGA_LIBS=$(VIDIX_LIBS) -lm
-
-MGA_CRTC2_LIBS=$(VIDIX_LIBS) -lm
 MGA_CRTC2_CFLAGS=$(VIDIX_CFLAGS) -DCRTC2
 
-NVIDIA_LIBS=$(VIDIX_LIBS) -lm
-
-UNICHROME_LIBS=$(VIDIX_LIBS) -lm
-
-SAVAGE_LIBS=$(VIDIX_LIBS) -lm
-
 all:    cyberblade_vid.so radeon_vid.so rage128_vid.so mach64_vid.so \
         nvidia_vid.so mga_vid.so mga_crtc2_vid.so pm3_vid.so \
         sis_vid.so unichrome_vid.so savage_vid.so
@@ -38,7 +26,7 @@
 	$(CC) -c $(VIDIX_CFLAGS) -o $@ $<
 
 cyberblade_vid.so: cyberblade_vid.o
-	$(CC) -shared $< $(CYBERBLADE_LIBS) -Wl,-soname,$@ -o $@
+	$(CC) -shared $< $(VIDIX_LIBS_M) -Wl,-soname,$@ -o $@
 
 pm3_vid.o: pm3_vid.c
 	$(CC) -c $(VIDIX_CFLAGS) -o $@ $<
@@ -50,13 +38,13 @@
 	$(CC) -c $(VIDIX_CFLAGS) -o $@ $<
 
 radeon_vid.so: radeon_vid.o
-	$(CC) -shared $< $(RADEON_LIBS) -Wl,-soname,$@ -o $@
+	$(CC) -shared $< $(VIDIX_LIBS_X) -Wl,-soname,$@ -o $@
 
 rage128_vid.o: radeon_vid.c
 	$(CC) -c $(RAGE128_CFLAGS) -o $@ $<
 
 rage128_vid.so: rage128_vid.o
-	$(CC) -shared $< $(RAGE128_LIBS) -Wl,-soname,$@ -o $@
+	$(CC) -shared $< $(VIDIX_LIBS_X) -Wl,-soname,$@ -o $@
 
 mach64_vid.o: mach64_vid.c
 	$(CC) -c $(VIDIX_CFLAGS) -o $@ $<
@@ -68,19 +56,19 @@
 	$(CC) -c $(VIDIX_CFLAGS) -o $@ $<
 
 nvidia_vid.so: nvidia_vid.o
-	$(CC) -shared $< $(NVIDIA_LIBS) -Wl,-soname,$@ -o $@
+	$(CC) -shared $< $(VIDIX_LIBS_M) -Wl,-soname,$@ -o $@
 
 mga_vid.o: mga_vid.c
 	$(CC) -c $(VIDIX_CFLAGS) -o $@ $<
 
 mga_vid.so: mga_vid.o
-	$(CC) -shared $< $(MGA_LIBS) -Wl,-soname,$@ -o $@
+	$(CC) -shared $< $(VIDIX_LIBS_M) -Wl,-soname,$@ -o $@
 
 mga_crtc2_vid.o: mga_vid.c
 	$(CC) -c $(MGA_CRTC2_CFLAGS) -o $@ $<
 
 mga_crtc2_vid.so: mga_crtc2_vid.o
-	$(CC) -shared $< $(MGA_CRTC2_LIBS) -Wl,-soname,$@ -o $@
+	$(CC) -shared $< $(VIDIX_LIBS_M) -Wl,-soname,$@ -o $@
 
 sis_vid.o sis_bridge.o: sis_vid.c sis_bridge.c
 	$(CC) -c $(VIDIX_CFLAGS) -o $@ $(basename $@).c
@@ -92,13 +80,13 @@
 	$(CC) -c $(VIDIX_CFLAGS) -o $@ $<
 
 unichrome_vid.so: unichrome_vid.o
-	$(CC) -shared $< $(UNICHROME_LIBS) -Wl,-soname,$@ -o $@
+	$(CC) -shared $< $(VIDIX_LIBS_M) -Wl,-soname,$@ -o $@
 
 savage_vid.o: savage_vid.c
 	$(CC) -c $(VIDIX_CFLAGS) -o $@ $<
 
 savage_vid.so: savage_vid.o
-	$(CC) -shared $< $(SAVAGE_LIBS) -Wl,-soname,$@ -o $@
+	$(CC) -shared $< $(VIDIX_LIBS_M) -Wl,-soname,$@ -o $@
 
 clean:
 	rm -f *.o *.so *~