summaryrefslogtreecommitdiff
path: root/src/libXvMC/Makefile
blob: c154e17dc353577678f8b430c7d924a3f42d2632 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
TARGET		= libXvMCg3dvl.so
SONAME		= libXvMCg3dvl.so.1
GALLIUMDIR	= ../gallium

OBJECTS         = block.o surface.o context.o subpicture.o attributes.o

ifeq (${DRIVER}, softpipe)
OBJECTS         += ${GALLIUMDIR}/winsys/g3dvl/xsp_winsys.o
endif

CFLAGS	+= -g -fPIC -Wall -Werror			\
	   -I${GALLIUMDIR}/state_trackers/g3dvl		\
	   -I${GALLIUMDIR}/winsys/g3dvl			\
	   -I${GALLIUMDIR}/include			\
	   -I${GALLIUMDIR}/auxiliary			\
	   -I${GALLIUMDIR}/drivers

ifeq (${DRIVER}, softpipe)
LDFLAGS	+= -L${GALLIUMDIR}/state_trackers/g3dvl		\
	   -L${GALLIUMDIR}/drivers/softpipe		\
	   -L${GALLIUMDIR}/auxiliary/tgsi		\
	   -L${GALLIUMDIR}/auxiliary/draw		\
	   -L${GALLIUMDIR}/auxiliary/translate		\
	   -L${GALLIUMDIR}/auxiliary/cso_cache		\
	   -L${GALLIUMDIR}/auxiliary/util		\
	   -L${GALLIUMDIR}/auxiliary/rtasm
else
LDFLAGS	+= -L${GALLIUMDIR}/state_trackers/g3dvl		\
   	   -L${GALLIUMDIR}/winsys/g3dvl/nouveau		\
   	   -L${GALLIUMDIR}/auxiliary/util
endif

ifeq (${DRIVER}, softpipe)
LIBS	+= -lg3dvl -lsoftpipe -ldraw -ltgsi -ltranslate -lrtasm -lcso_cache -lutil -lm
else
LIBS	+= -lg3dvl -lnouveau_dri -lutil
endif

#############################################

.PHONY	= all clean

all: ${TARGET}

ifeq (${DRIVER}, softpipe)
${TARGET}: ${OBJECTS}
	cd ${GALLIUMDIR}/state_trackers/g3dvl; ${MAKE}
	$(CC) ${LDFLAGS} -shared -Wl,-soname,${SONAME} -o $@ $^ ${LIBS}

clean:
	cd ${GALLIUMDIR}/state_trackers/g3dvl; ${MAKE} clean
	rm -rf ${OBJECTS} ${TARGET}
else
${TARGET}: ${OBJECTS}
	cd ${GALLIUMDIR}/state_trackers/g3dvl; ${MAKE}
	cd ${GALLIUMDIR}/winsys/g3dvl/nouveau; ${MAKE}
	$(CC) ${LDFLAGS} -shared -Wl,-soname,${SONAME} -o $@ $^ ${LIBS}

clean:
	cd ${GALLIUMDIR}/state_trackers/g3dvl; ${MAKE} clean
	cd ${GALLIUMDIR}/winsys/g3dvl/nouveau; ${MAKE} clean
	rm -rf ${OBJECTS} ${TARGET}
endif